Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. #if DEBUG
  2.  
  3. var cors = new EnableCorsAttribute("*", "*", "*");
  4. config.EnableCors(cors);
  5.  
  6. #if DEBUG
  7.  
  8. config.MapHttpAttributeRoutes();
  9. ...
  10.  
  11. public static void Register()
  12. {
  13. ConfigOptions options = new ConfigOptions();
  14.  
  15. HttpConfiguration config = ServiceConfig.Initialize(new ConfigBuilder(options));
  16.  
  17. #if DEBUG
  18.  
  19. var cors = new EnableCorsAttribute("*", "*", "*");
  20. config.EnableCors(cors);
  21.  
  22. #endif
  23. }
  24.  
  25. <system.webServer>
  26. <httpProtocol>
  27. <customHeaders>
  28. <add name="Access-Control-Allow-Origin" value="*" />
  29. </customHeaders>
  30. </httpProtocol>
  31. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement