f logging
This commit is contained in:
+14
-2
@@ -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) });
|
||||
|
||||
|
||||
Reference in New Issue
Block a user