If you have access to change the Web.Config on the server you want til make request to, you can set up some extra information for the http header to make request possibly.
Example - part of Web.Config file
<configuration>
......
<system.webServer>
......
<httpProtocol>
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*"/>
<add name="Access-Control-Allow-Headers" value="Content-Type, Accept" />
<add name="Access-Control-Allow-Methods" value="POST,GET,OPTIONS" />
<add name="Access-Control-Max-Age" value="1728000" />
</customHeaders>
</httpProtocol>
......
</system.webServer>
......
</configuration>
You can find more information here:
Description in details:
Briefly solution
Thank you Jeppe B for the solution.
Ingen kommentarer:
Send en kommentar