API Connection Cleanup & Bugfixes

This commit is contained in:
daniel-c-harvey
2025-09-08 11:10:23 -04:00
parent c6f4ffc1fe
commit bf054f3d1b
10 changed files with 44 additions and 18 deletions
+5 -4
View File
@@ -47,9 +47,11 @@ builder.Services.Configure<ForwardedHeadersOptions>(options =>
var app = builder.Build();
// Configure the HTTP request pipeline.
// Use forwarded headers before other middleware
app.UseForwardedHeaders();
if (app.Environment.IsProduction())
{
// Use forwarded headers before other middleware
app.UseForwardedHeaders();
}
if (app.Environment.IsDevelopment())
{
@@ -58,7 +60,6 @@ if (app.Environment.IsDevelopment())
app.UseCors("ContentApiPolicy");
app.UseApiKeyAuthentication(apiKeySettings.ApiKey);
app.UseAuthorization();
app.MapControllers();