Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setja i global.asax.cs
- protected void Application_BeginRequest()
- {
- if (Request.Headers.AllKeys.Contains("Origin") && Request.HttpMethod == "OPTIONS")
- {
- Response.Flush();
- }
- }
- }
- setja i webconfig undir system.webserver
- <httpProtocol>
- <customHeaders>
- <add name="Access-Control-Allow-Origin" value="*" />
- <add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept,Authorization" />
- <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
- </customHeaders>
- </httpProtocol>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement