Skip to content

Commit

Permalink
fix: behind-proxy used on incorrect router
Browse files Browse the repository at this point in the history
  • Loading branch information
lrstanley committed Sep 22, 2020
1 parent a2dfcd8 commit a1d277f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func initMetrics(ctx context.Context, wg *sync.WaitGroup, errors chan<- error, r
// Custom http server specifically for metrics (makes it easier to firewall off).
mux := chi.NewRouter()
if conf.Proxy {
r.Use(middleware.RealIP)
mux.Use(middleware.RealIP)
}

mux.Use(middleware.DefaultCompress)
Expand Down

0 comments on commit a1d277f

Please sign in to comment.