mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-07-04 17:06:49 +00:00
Oauth2 support
This commit is contained in:
16
backend/internal/api/middleware/log.go
Normal file
16
backend/internal/api/middleware/log.go
Normal file
@ -0,0 +1,16 @@
|
||||
package middleware
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"npm/internal/logger"
|
||||
)
|
||||
|
||||
// Log will print out route information to the logger
|
||||
// only when debug is enabled
|
||||
func Log(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
logger.Debug("Request: %s %s", r.Method, r.URL.Path)
|
||||
next.ServeHTTP(w, r)
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user