Skip to content

Instantly share code, notes, and snippets.

@ivanbuzyka
ivanbuzyka / cors.global.asax
Created August 17, 2016 16:58 — forked from sergeyt/cors.global.asax
global.asax to enable CORS on IIS server
<%@ Application Language="C#" %>
<script runat="server">
void Application_BeginRequest(object sender, EventArgs e)
{
var context = HttpContext.Current;
var response = context.Response;
// enable CORS
response.AddHeader("Access-Control-Allow-Origin", "*");