|
|
|
@ -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<ForwardedHeadersOptions>(options =>
|
|
|
|
|
{
|
|
|
|
|
options.ForwardedHeaders =
|
|
|
|
|
ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
services.Configure<SmtpSettings>(smtpSettingsconf)
|
|
|
|
|
.Configure<IsndSettings>(isndSettingsconf)
|
|
|
|
|
.Configure<AdminStartupList>(adminStartupListConf)
|
|
|
|
@ -140,6 +147,7 @@ namespace isnd
|
|
|
|
|
ApplicationDbContext dbContext,
|
|
|
|
|
IOptions<IsndSettings> isnSettingsOption)
|
|
|
|
|
{
|
|
|
|
|
app.UseForwardedHeaders();
|
|
|
|
|
if (env.IsDevelopment())
|
|
|
|
|
{
|
|
|
|
|
app.UseDeveloperExceptionPage();
|
|
|
|
|