Honour forwarded headers only from trusted proxies (closes #259)
check / check (push) Failing after 7s
check / check (push) Failing after 7s
A new ClientIP middleware sets request.RemoteAddr to the client's address before the request is logged. X-Forwarded-For and X-Real-IP count only when the peer is in TRUSTED_PROXIES, which defaults to the RFC 1918 ranges. The login rate limit, the session's IP address and hostname, and the request log all use that address. Model: opus-5-5
This commit is contained in:
1 parent
bc8aa6bb96
commit
f5dd70047e
10 files changed
+599
-44
No files matched your search
@@ -23,6 +23,7 @@ func (srv *Server) SetupRoutes() {
|
||||
|
||||
srv.router.Use(middleware.Recoverer)
|
||||
srv.router.Use(middleware.RequestID)
|
||||
srv.router.Use(srv.mw.ClientIP())
|
||||
srv.router.Use(srv.mw.Logging())
|
||||
|
||||
if viper.GetString("METRICS_USERNAME") != "" {
|
||||
|
||||
Reference in new issue
Block a user