Advertisement
Guest User

Flush

a guest
Jan 17th, 2017
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. setja i global.asax.cs
  2. protected void Application_BeginRequest()
  3. {
  4. if (Request.Headers.AllKeys.Contains("Origin") && Request.HttpMethod == "OPTIONS")
  5. {
  6. Response.Flush();
  7. }
  8.  
  9. }
  10.  
  11. }
  12. setja i webconfig undir system.webserver
  13. <httpProtocol>
  14. <customHeaders>
  15. <add name="Access-Control-Allow-Origin" value="*" />
  16. <add name="Access-Control-Allow-Headers" value="Origin, X-Requested-With, Content-Type, Accept,Authorization" />
  17. <add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS" />
  18. </customHeaders>
  19. </httpProtocol>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement