fix: user location fix

This commit is contained in:
Krispire Admin
2026-06-18 23:52:17 +05:30
parent dc204577a8
commit d52530c52c
3 changed files with 54 additions and 4 deletions
+4 -1
View File
@@ -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))