Another attempt
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Simon 2021-10-03 03:05:31 +01:00
parent b7f07c36b9
commit 2d52da61a3
1 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,7 @@ var Configuration = builder.Configuration;
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
options.RequireHeaderSymmetry = false;
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
});
@ -37,12 +38,12 @@ builder.Services.AddAuthentication(options => {
var app = builder.Build();
// Configure the HTTP request pipeline.
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler("/Error");
app.UseForwardedHeaders();
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
@ -51,6 +52,8 @@ app.UseStaticFiles();
app.UseAuthentication();
app.UseForwardedHeaders();
app.UseRouting();
app.UseAuthorization();