mirror of
https://github.com/byo-software/steam-openid-connect-provider.git
synced 2025-01-09 18:06:22 +00:00
Added support for PathBase to be used behind a reverse proxy
This commit is contained in:
parent
d86435cce5
commit
ee132ce9fe
3 changed files with 17 additions and 2 deletions
|
@ -41,7 +41,11 @@ namespace SteamOpenIdConnectProvider
|
|||
options.UserInteraction.LoginUrl = "/ExternalLogin";
|
||||
})
|
||||
.AddAspNetIdentity<IdentityUser>()
|
||||
.AddInMemoryClients(IdentityServerConfig.GetClients(Configuration["OpenID:ClientID"], Configuration["OpenID:ClientSecret"], Configuration["OpenID:RedirectUri"], Configuration["OpenID:PostLogoutRedirectUri"]))
|
||||
.AddInMemoryClients(IdentityServerConfig.GetClients(
|
||||
Configuration["OpenID:ClientID"],
|
||||
Configuration["OpenID:ClientSecret"],
|
||||
Configuration["OpenID:RedirectUri"],
|
||||
Configuration["OpenID:PostLogoutRedirectUri"]))
|
||||
.AddInMemoryPersistedGrants()
|
||||
.AddDeveloperSigningCredential(true)
|
||||
.AddInMemoryIdentityResources(IdentityServerConfig.GetIdentityResources());
|
||||
|
@ -63,6 +67,11 @@ namespace SteamOpenIdConnectProvider
|
|||
app.UseDeveloperExceptionPage();
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(Configuration["Hosting:PathBase"]))
|
||||
{
|
||||
app.UsePathBase(Configuration["Hosting:PathBase"]);
|
||||
}
|
||||
|
||||
app.UseRouting();
|
||||
app.UseIdentityServer();
|
||||
app.UseEndpoints(endpoints =>
|
||||
|
|
|
@ -5,5 +5,8 @@
|
|||
"System": "Information",
|
||||
"Microsoft": "Information"
|
||||
}
|
||||
},
|
||||
"Hosting": {
|
||||
"PathBase": "/test"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,5 +10,8 @@
|
|||
"RedirectUri": "http://localhost:8080/auth/realms/master/broker/steam/endpoint",
|
||||
"PostLogoutRedirectUri": ""
|
||||
},
|
||||
"AllowedHosts": "*"
|
||||
"AllowedHosts": "*",
|
||||
"Hosting": {
|
||||
"PathBase": ""
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue