Random Stuff (#3798)
This commit is contained in:
parent
574cf4b78e
commit
70f00895e8
63 changed files with 659 additions and 567 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
|
@ -26,7 +27,7 @@ public class SecurityEventMiddleware(RequestDelegate next)
|
|||
}
|
||||
catch (KavitaUnauthenticatedUserException ex)
|
||||
{
|
||||
var ipAddress = context.Connection.RemoteIpAddress?.ToString();
|
||||
var ipAddress = context.Request.Headers["X-Forwarded-For"].FirstOrDefault() ?? context.Connection.RemoteIpAddress?.ToString();
|
||||
var requestMethod = context.Request.Method;
|
||||
var requestPath = context.Request.Path;
|
||||
var userAgent = context.Request.Headers.UserAgent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue