Remove server header from responses
This commit is contained in:
@@ -48,6 +48,7 @@ let main args =
|
|||||||
WebRootPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"),
|
WebRootPath = Path.Combine(Directory.GetCurrentDirectory(), "wwwroot"),
|
||||||
Args = args))
|
Args = args))
|
||||||
let _ = builder.WebHost.UseStaticWebAssets()
|
let _ = builder.WebHost.UseStaticWebAssets()
|
||||||
|
let _ = builder.WebHost.UseKestrel(fun opts -> opts.AddServerHeader <- false)
|
||||||
builder.Services
|
builder.Services
|
||||||
.Configure<ForwardedHeadersOptions>(
|
.Configure<ForwardedHeadersOptions>(
|
||||||
fun (opts: ForwardedHeadersOptions) ->
|
fun (opts: ForwardedHeadersOptions) ->
|
||||||
|
|||||||
Reference in New Issue
Block a user