mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-10-25 05:12:04 +00:00
A panel or API request rejected for a missing or wrong CSRF token got a bare 403 and left nothing in the log, so an operator chasing failed logins from a stale tab or a script had no trace. CSRFMiddleware now logs a warning with the method, path and client address. The address comes from getRemoteIp, which honours the trusted-proxy list, instead of gin's ClientIP, which trusts any peer's X-Forwarded-For. |
||
|---|---|---|
| .. | ||
| bodylimit.go | ||
| bodylimit_test.go | ||
| config_envelope.go | ||
| config_envelope_test.go | ||
| domainValidator.go | ||
| security.go | ||
| security_test.go | ||
| validate.go | ||
| validate_mutation_test.go | ||
| validate_protocol_test.go | ||
| validate_test.go | ||