diff --git a/src/isnd/Startup.cs b/src/isnd/Startup.cs index 7c000a3..93be266 100644 --- a/src/isnd/Startup.cs +++ b/src/isnd/Startup.cs @@ -28,6 +28,7 @@ using System.Text.Json; using System.Text.Json.Serialization; using isnd.Data.Catalog; using Newtonsoft.Json; +using Microsoft.AspNetCore.HttpOverrides; namespace isnd { @@ -50,6 +51,12 @@ namespace isnd var adminStartupListConf = Configuration.GetSection("AdminList"); var unleashConf = Configuration.GetSection("Unleash"); + services.Configure(options => + { + options.ForwardedHeaders = + ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto; + }); + services.Configure(smtpSettingsconf) .Configure(isndSettingsconf) .Configure(adminStartupListConf) @@ -140,6 +147,7 @@ namespace isnd ApplicationDbContext dbContext, IOptions isnSettingsOption) { + app.UseForwardedHeaders(); if (env.IsDevelopment()) { app.UseDeveloperExceptionPage();