fix: user location fix
This commit is contained in:
@@ -407,7 +407,10 @@ func (s *Server) setupRouter() {
|
||||
|
||||
// Global middleware
|
||||
r.Use(chiMiddleware.RequestID)
|
||||
r.Use(chiMiddleware.RealIP)
|
||||
// Our RealIP (not chi's): a single trusted edge proxy (Dokploy's Traefik)
|
||||
// appends the real client to the right of X-Forwarded-For, so we read the
|
||||
// right-most entry. chi's RealIP trusts the spoofable left-most entry.
|
||||
r.Use(middleware.RealIP)
|
||||
r.Use(middleware.Logger(s.logger))
|
||||
r.Use(chiMiddleware.Recoverer)
|
||||
r.Use(chiMiddleware.Compress(5))
|
||||
|
||||
Reference in New Issue
Block a user