标签:
#region 支持跨域请求 //Response.ClearHeaders(); string origin = Request.Headers["Origin"]; Response.AppendHeader("Access-Control-Allow-Origin", string.IsNullOrEmpty(origin) ? "*" : origin); string requestHeaders = Request.Headers["Access-Control-Request-Headers"]; Response.AppendHeader("Access-Control-Allow-Headers", string.IsNullOrEmpty(requestHeaders) ? "*" : requestHeaders); Response.AppendHeader("Access-Control-Allow-Methods", "POST, OPTIONS"); #endregion
标签:
原文地址:http://www.cnblogs.com/BigMouth/p/4226767.html