mirror of
https://github.com/bitwarden/server
synced 2025-12-12 14:23:38 +00:00
adjusting config
This commit is contained in:
@@ -90,10 +90,6 @@ namespace Bit.Identity
|
|||||||
options.Authority = globalSettings.BaseServiceUri.Sso;
|
options.Authority = globalSettings.BaseServiceUri.Sso;
|
||||||
options.MetadataAddress = globalSettings.BaseServiceUri.InternalSso +
|
options.MetadataAddress = globalSettings.BaseServiceUri.InternalSso +
|
||||||
"/.well-known/openid-configuration";
|
"/.well-known/openid-configuration";
|
||||||
options.Configuration = new OpenIdConnectConfiguration
|
|
||||||
{
|
|
||||||
AuthorizationEndpoint = globalSettings.BaseServiceUri.Sso + "/connect/authorize"
|
|
||||||
};
|
|
||||||
options.RequireHttpsMetadata = !Environment.IsDevelopment() &&
|
options.RequireHttpsMetadata = !Environment.IsDevelopment() &&
|
||||||
globalSettings.BaseServiceUri.InternalIdentity.StartsWith("https");
|
globalSettings.BaseServiceUri.InternalIdentity.StartsWith("https");
|
||||||
options.ClientId = "oidc-identity";
|
options.ClientId = "oidc-identity";
|
||||||
@@ -148,12 +144,16 @@ namespace Bit.Identity
|
|||||||
GlobalSettings globalSettings,
|
GlobalSettings globalSettings,
|
||||||
ILogger<Startup> logger)
|
ILogger<Startup> logger)
|
||||||
{
|
{
|
||||||
var identityUri = new Uri(globalSettings.BaseServiceUri.Identity);
|
if (globalSettings.SelfHosted)
|
||||||
app.Use(async (ctx, next) =>
|
|
||||||
{
|
{
|
||||||
//ctx.SetIdentityServerOrigin($"{identityUri.Scheme}://{identityUri.Host}");
|
var identityUri = new Uri(globalSettings.BaseServiceUri.Identity);
|
||||||
await next();
|
app.Use(async (ctx, next) =>
|
||||||
});
|
{
|
||||||
|
ctx.SetIdentityServerOrigin($"{identityUri.Scheme}://{identityUri.Host}");
|
||||||
|
ctx.SetIdentityServerBasePath(identityUri.LocalPath);
|
||||||
|
await next();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
IdentityModelEventSource.ShowPII = true;
|
IdentityModelEventSource.ShowPII = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user