fixed remoteip in auditlogs not using correct value

This commit is contained in:
2026-03-05 18:09:15 +11:00
parent efe382ad64
commit 72ed61b49c

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