1
0
mirror of https://github.com/bitwarden/server.git synced 2025-04-14 01:28:14 -05:00

adjusting config

This commit is contained in:
Kyle Spearrin 2020-08-31 18:25:27 -04:00
parent aa67de64c4
commit 613edab908

@ -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;