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