Log real IP address
Log real IP address of the client when accessed through a reverse proxy
This commit is contained in:
parent
00298df1cc
commit
408d244471
1 changed files with 1 additions and 0 deletions
1
serve.go
1
serve.go
|
@ -12,6 +12,7 @@ import (
|
||||||
// Serve starts the app's web server
|
// Serve starts the app's web server
|
||||||
func Serve() {
|
func Serve() {
|
||||||
r := chi.NewRouter()
|
r := chi.NewRouter()
|
||||||
|
r.Use(middleware.RealIP)
|
||||||
r.Use(middleware.Logger, middleware.CleanPath, middleware.StripSlashes)
|
r.Use(middleware.Logger, middleware.CleanPath, middleware.StripSlashes)
|
||||||
r.NotFound(NotFound)
|
r.NotFound(NotFound)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue