Use realIP
All checks were successful
Build and Push Docker Image on Tag / Build and Push Docker Image (push) Successful in 15m31s
All checks were successful
Build and Push Docker Image on Tag / Build and Push Docker Image (push) Successful in 15m31s
Code was copied from https://github.com/go-chi/chi/blob/master/middleware/realip.go
This commit is contained in:
@ -20,7 +20,7 @@ func (app *application) recoverPanic(next http.Handler) http.Handler {
|
||||
func (app *application) logRequest(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
var (
|
||||
ip = r.RemoteAddr
|
||||
ip = realIP(r)
|
||||
proto = r.Proto
|
||||
method = r.Method
|
||||
uri = r.URL.RequestURI()
|
||||
|
Reference in New Issue
Block a user