Example #1
0
        public override Task ProcessRequestAsync(HostContext context)
        {
            // Generate the proxy
            if (context.Request.Url.LocalPath.EndsWith("/hubs", StringComparison.OrdinalIgnoreCase))
            {
                context.Response.ContentType = "application/x-javascript";
                return(context.Response.EndAsync(_proxyGenerator.GenerateProxy(_url)));
            }

            _isDebuggingEnabled = context.IsDebuggingEnabled();

            return(base.ProcessRequestAsync(context));
        }