:`(
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Simon 2021-10-03 03:11:40 +01:00
parent 2d52da61a3
commit bacb791ba9
1 changed files with 5 additions and 15 deletions

View File

@ -8,13 +8,6 @@ using Microsoft.Extensions.Configuration;
var builder = WebApplication.CreateBuilder(args);
var Configuration = builder.Configuration;
builder.Services.Configure<ForwardedHeadersOptions>(options =>
{
options.RequireHeaderSymmetry = false;
options.ForwardedHeaders =
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
});
// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddControllers();
@ -38,6 +31,11 @@ builder.Services.AddAuthentication(options => {
var app = builder.Build();
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
RequireHeaderSymmetry = false,
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
// Configure the HTTP request pipeline.
@ -52,18 +50,10 @@ app.UseStaticFiles();
app.UseAuthentication();
app.UseForwardedHeaders();
app.UseRouting();
app.UseAuthorization();
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
RequireHeaderSymmetry = false,
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});
app.MapRazorPages();
app.Run();