fixed remoteip in auditlogs not using correct value
This commit is contained in:
@@ -18,7 +18,7 @@ func NewAudit(ipAdd, agent string, user *User) *AuditMeta {
|
|||||||
|
|
||||||
func NewAuditFromRequest(r *http.Request) *AuditMeta {
|
func NewAuditFromRequest(r *http.Request) *AuditMeta {
|
||||||
u := CurrentUser(r.Context())
|
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
|
// AuditInfo contains metadata for audit logging
|
||||||
|
|||||||
Reference in New Issue
Block a user