Respect X-Forwarded-* headers

This commit is contained in:
James Chapman 2023-11-11 21:40:25 +00:00
parent 6c954a5446
commit 30e774da38
Signed by: jamsch0
GPG Key ID: 765FE58130277547

@ -3,6 +3,7 @@ using Groceries.Common;
using Groceries.Data; using Groceries.Data;
using Microsoft.AspNetCore.Authentication.OAuth; using Microsoft.AspNetCore.Authentication.OAuth;
using Microsoft.AspNetCore.DataProtection; using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc.Infrastructure; using Microsoft.AspNetCore.Mvc.Infrastructure;
using Microsoft.AspNetCore.Mvc.Razor; using Microsoft.AspNetCore.Mvc.Razor;
@ -85,6 +86,7 @@ builder.Services.AddDbContextPool<AppDbContext>(options => options
var app = builder.Build(); var app = builder.Build();
app.UseForwardedHeaders(new() { ForwardedHeaders = ForwardedHeaders.All });
app.UseStaticFiles(); app.UseStaticFiles();
app.UseRouting(); app.UseRouting();