diff --git a/auth.go b/auth.go index 5b7c8a4..a88dc93 100644 --- a/auth.go +++ b/auth.go @@ -12,8 +12,9 @@ type AuthHandler struct { func (l *AuthHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { AuthHeader := r.Header.Get("Authorization") + RealIP := r.Header.Get("X-Real-IP") if AuthHeader != task.Auth { - log.Printf("Dropping request from %s.", r.RemoteAddr) + log.Printf("Dropping request from %s.", RealIP) return // drop } l.Handler.ServeHTTP(w, r)