Hi everyone,
I have configured cross-origin resource sharing in my web.config file.
<customHeaders>
<add name="Access-Control-Allow-Origin" value="*" />
</customHeaders>
In this case, multiple sites are running on the same installation. For some sites i want to remove the Access-Control-Allow-Origin header.
I have tried the following code in my Global.asax file, but that doesn't work.
public void Application_EndRequest()
{
HttpContext.Current.Response.Headers.Remove("Access-Control-Allow-Origin");
}
Can anyone explain to me how i could fix this?
Thank a lot.
Jordy
Go to the complete details ...