diff --git a/src/Startup.cs b/src/Startup.cs index 146e59d..a562c62 100644 --- a/src/Startup.cs +++ b/src/Startup.cs @@ -41,7 +41,11 @@ namespace SteamOpenIdConnectProvider options.UserInteraction.LoginUrl = "/ExternalLogin"; }) .AddAspNetIdentity() - .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 => diff --git a/src/appsettings.Development.json b/src/appsettings.Development.json index e203e94..9988482 100644 --- a/src/appsettings.Development.json +++ b/src/appsettings.Development.json @@ -5,5 +5,8 @@ "System": "Information", "Microsoft": "Information" } + }, + "Hosting": { + "PathBase": "/test" } } diff --git a/src/appsettings.json b/src/appsettings.json index 5ea4b94..5582ca6 100644 --- a/src/appsettings.json +++ b/src/appsettings.json @@ -10,5 +10,8 @@ "RedirectUri": "http://localhost:8080/auth/realms/master/broker/steam/endpoint", "PostLogoutRedirectUri": "" }, - "AllowedHosts": "*" + "AllowedHosts": "*", + "Hosting": { + "PathBase": "" + } } \ No newline at end of file