Beispiel #1
0
        public Task Invoke(HttpContext httpContext)
        {
            if (httpContext.Request.Path.StartsWithSegments(_path, StringComparison.Ordinal))
            {
                return(PlaintextMiddleware.WriteResponse(httpContext.Response));
            }

            return(_next(httpContext));
        }
        public Task Invoke(HttpContext httpContext)
        {
            if (httpContext.Request.Path.StartsWithSegments(_path, StringComparison.Ordinal))
            {
                httpContext.Response.Headers["cache-control"] = "public, max-age=1";
                return(PlaintextMiddleware.WriteResponse(httpContext.Response));
            }

            return(_next(httpContext));
        }