fixed remoteip in auditlogs not using correct value

This commit is contained in:
2026-03-05 18:09:15 +11:00
parent 02cb57eb7e
commit c49d58f9b7

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