![]() ![]() Simply activate the add-on and perform the request. ![]() This program and the accompanying materials 5 * are made available under the terms of the Eclipse Public License 2.0 6 * which accompanies this distribution, and is available at 7 * 8 * 9 * SPDX-License-Identifier: EPL-2.0 10 *******************************************************************************/ 11 // end::copyright 12 package it.io. ġ3 14 import static .Assertions.assertEquals Ģ0 21 import .BeforeEach Ģ5 26 String port = System.getProperty( " ") Ģ7 String pathToHost = " " + port + " / " ģ1 // JVM does not allow restricted headers by default 32 // Set to true for CORS testing 33 tProperty( " . Allow CORS: Access-Control-Allow-Origin lets you easily perform cross-domain Ajax requests in web applications. Removed config.EnableCors() from the WebApiConfig.cs file and just set the EnableCors('','','') attribute on the Controller class. Installing this add-on will allow you to unblock this feature. CORS is a feature of HTTP that uses headers to allow browsers to display content which a web server requested from a different origin. CORS or Cross Origin Resource Sharing is blocked in modern browsers by default (in JavaScript APIs).
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |