f logging

This commit is contained in:
dingo
2026-01-30 15:13:55 -05:00
parent 09ad67010d
commit f5bd4c0def
+14 -2
View File
@@ -125,6 +125,15 @@ builder.Services.AddDataProtection()
//}
var app = builder.Build();
app.Use(async (ctx, next) =>
{
var raw = ctx.Request.Headers.Cookie.ToString();
if (!string.IsNullOrEmpty(raw))
app.Logger.LogInformation("RAW Cookie: {Raw}", raw);
await next();
});
var fwdOpts = new ForwardedHeadersOptions
{
ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
@@ -229,8 +238,7 @@ app.Use(async (ctx, next) =>
await next();
});
// ---- Session middleware (must be before routing) ----
app.UseSession();
app.Use(async (ctx, next) =>
{
var af = ctx.Request.Cookies[".Divers.Admin.AntiForgery"];
@@ -249,6 +257,10 @@ app.Use(async (ctx, next) =>
}
});
// ---- Session middleware (must be before routing) ----
app.UseSession();
// ---- WebSockets endpoint ----
app.UseWebSockets(new WebSocketOptions { KeepAliveInterval = TimeSpan.FromSeconds(20) });