public static IApplicationBuilder UseOverrideHeaders(this IApplicationBuilder builder, OverrideHeaderMiddlewareOptions options)
 {
     return builder.Use(next => new HeaderOverrideMiddleware(next, options).Invoke);
 }
 public HeaderOverrideMiddleware(RequestDelegate next, OverrideHeaderMiddlewareOptions overrideMiddlewareOptions)
 {
     options = overrideMiddlewareOptions;
 }
Exemplo n.º 3
0
 public void Configure(IApplicationBuilder app)
 {
     var OverrideMiddlewareOptions = new OverrideHeaderMiddlewareOptions(true);
     OverrideMiddlewareOptions.XForwardProtoEnabled = false;
     app.UseOverrideHeaders(OverrideMiddlewareOptions);
 }