示例#1
0
        public void ProcessRequest(HttpContext context)
        {
            string requestedFilePath = context.Request.PhysicalPath;

            CorsEnabler ce = new CorsEnabler();

            ce.AddCorsHeaders(context);

            context.Response.ContentType = $"application/font-{Path.GetExtension(requestedFilePath).ToLower()}";
            context.Response.WriteFile(requestedFilePath);
        }
示例#2
0
        public void Process(HttpRequestArgs args)
        {
            CorsEnabler ce = new CorsEnabler();

            ce.AddCorsHeaders(args.Context);
        }