fixed remoteip in auditlogs not using correct value

This commit is contained in:
2026-03-05 18:09:15 +11:00
parent 9a14c2f677
commit 779888921e

View File

@@ -18,7 +18,7 @@ func NewAudit(ipAdd, agent string, user *User) *AuditMeta {
func NewAuditFromRequest(r *http.Request) *AuditMeta {
u := CurrentUser(r.Context())
return &AuditMeta{r.RemoteAddr, r.UserAgent(), u}
return &AuditMeta{r.Header.Get("X-Forwarded-For"), r.UserAgent(), u}
}
// AuditInfo contains metadata for audit logging