Browse Source

Added real IP support. See more.

Somehow I missed actually implementing this, and I don't know if it's
because I had so many other things floating around in my walnut-sized
brain or whether I geniunely did forget about this. Either way, real IP
support had been added to the configuration a very long time ago but
never actually made its way in to the implementation.

Go figure.

Sometimes it shows that even when you believed you wrote something down,
you forgot about either where you wrote down the thing you were supposed
to remember, or you outright didn't remember what your notes were
intended to mean. In this case, I never revisited the configuration.
master
Benjamin Shelton 4 weeks ago
parent
commit
85984cdecc
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      application.go

+ 4
- 0
application.go View File

@@ -177,6 +177,10 @@ func (a *Application) DefaultMiddleware() {
}
}

if a.config.RealIP {
a.router.Middleware(middleware.RealIP)
}

logger := a.logger
if a.config.RequestLog != "" {
logger = logging.MustGetLogger(a.config.RequestLog)


Loading…
Cancel
Save