mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-09 18:06:22 +00:00
Add forwarded headers options
This commit is contained in:
parent
2e89b8cc6e
commit
6c4eb1db4d
1 changed files with 11 additions and 0 deletions
|
@ -11,6 +11,7 @@ using Microsoft.Extensions.Configuration;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using IdentityServer4.Services;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using SteamOpenIdConnectProvider.Database;
|
||||
using SteamOpenIdConnectProvider.Profile;
|
||||
|
||||
|
@ -97,6 +98,16 @@ namespace SteamOpenIdConnectProvider
|
|||
await next();
|
||||
});
|
||||
|
||||
var forwardOptions = new ForwardedHeadersOptions
|
||||
{
|
||||
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto,
|
||||
RequireHeaderSymmetry = false
|
||||
};
|
||||
|
||||
forwardOptions.KnownNetworks.Clear();
|
||||
forwardOptions.KnownProxies.Clear();
|
||||
|
||||
app.UseForwardedHeaders(forwardOptions);
|
||||
app.UseRouting();
|
||||
app.UseIdentityServer();
|
||||
app.UseEndpoints(endpoints =>
|
||||
|
|
Loading…
Reference in a new issue