using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace ShadowEditor.Server.Helpers { /// /// Html帮助类 /// public class HtmlHelper { /// /// 允许跨域访问 /// /// public static void EnableCrossDomain(ref HttpContext context) { if (!context.Response.Headers.AllKeys.Contains("Access-Control-Allow-Origin")) { context.Response.Headers.Add("Access-Control-Allow-Origin", "*"); } } } }