Another attempt
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
b7f07c36b9
commit
2d52da61a3
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue