Log real IP address

Log real IP address of the client when accessed through a reverse proxy
This commit is contained in:
Rithas K 2024-06-02 10:29:11 +05:30
parent 00298df1cc
commit 408d244471
No known key found for this signature in database

View file

@ -12,6 +12,7 @@ import (
// Serve starts the app's web server
func Serve() {
r := chi.NewRouter()
r.Use(middleware.RealIP)
r.Use(middleware.Logger, middleware.CleanPath, middleware.StripSlashes)
r.NotFound(NotFound)