Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #if DEBUG
- var cors = new EnableCorsAttribute("*", "*", "*");
- config.EnableCors(cors);
- #if DEBUG
- config.MapHttpAttributeRoutes();
- ...
- public static void Register()
- {
- ConfigOptions options = new ConfigOptions();
- HttpConfiguration config = ServiceConfig.Initialize(new ConfigBuilder(options));
- #if DEBUG
- var cors = new EnableCorsAttribute("*", "*", "*");
- config.EnableCors(cors);
- #endif
- }
- <system.webServer>
- <httpProtocol>
- <customHeaders>
- <add name="Access-Control-Allow-Origin" value="*" />
- </customHeaders>
- </httpProtocol>
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement