deploy: one-command scripts to build+run from deploy/.env

This commit is contained in:
cesnimda
2026-06-30 16:16:16 +02:00
parent a387d31f62
commit dcb939e4f2
9 changed files with 264 additions and 0 deletions
+11
View File
@@ -9,6 +9,7 @@ using InboxIntel.Infrastructure.Persistence;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.Google;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.HttpOverrides;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Options;
using Serilog;
@@ -89,6 +90,16 @@ if (app.Environment.IsDevelopment())
app.UseSwaggerUI();
}
// Honor X-Forwarded-* from the nginx reverse proxy so OAuth redirect URIs and
// cookie Secure flags reflect the external scheme/host, not the container's.
var forwardedOptions = new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost
};
forwardedOptions.KnownNetworks.Clear();
forwardedOptions.KnownProxies.Clear();
app.UseForwardedHeaders(forwardedOptions);
app.UseSerilogRequestLogging();
app.UseCors("frontend");
app.UseAuthentication();