Skip to content

Commit

Permalink
Merging hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm360 committed Jan 20, 2022
2 parents 2067f57 + 9a77c9e commit faac865
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/EthernaCredit/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.AspNetCore.Mvc.ApiExplorer;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -83,6 +84,11 @@ public void ConfigureServices(IServiceCollection services)
})
.SetApplicationName(CommonConsts.SharedCookieApplicationName);

services.Configure<ForwardedHeadersOptions>(options =>
{
options.ForwardedHeaders = ForwardedHeaders.All;
});

services.AddCors();
services.AddRazorPages(options =>
{
Expand Down Expand Up @@ -279,10 +285,12 @@ public void Configure(IApplicationBuilder app, IApiVersionDescriptionProvider ap
if (Environment.IsDevelopment())
{
app.UseDeveloperExceptionPage();
app.UseForwardedHeaders();
}
else
{
app.UseExceptionHandler("/Error");
app.UseForwardedHeaders();
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
Expand Down

0 comments on commit faac865

Please sign in to comment.