1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 08:32:50 -05:00

UseForwardedHeadersForAzure

This commit is contained in:
Kyle Spearrin
2017-07-21 12:53:26 -04:00
parent 64212a1874
commit f598b78ecb
5 changed files with 39 additions and 1 deletions

View File

@ -150,6 +150,12 @@ namespace Bit.Api
})
.AddDebug();
// Forwarded headers
if(!env.IsDevelopment())
{
app.UseForwardedHeadersForAzure();
}
// Rate limiting
app.UseMiddleware<CustomIpRateLimitMiddleware>();
@ -173,7 +179,7 @@ namespace Bit.Api
app.UseMvc();
}
private IdentityServerAuthenticationOptions GetIdentityOptions(IHostingEnvironment env,
private IdentityServerAuthenticationOptions GetIdentityOptions(IHostingEnvironment env,
string authority, string suffix)
{
var options = new IdentityServerAuthenticationOptions