mirror of
https://github.com/netbirdio/management-refactor.git
synced 2026-05-22 17:12:59 -07:00
13 lines
353 B
Go
13 lines
353 B
Go
package middleware
|
|
|
|
import "net/http"
|
|
|
|
// loggingMiddleware is an example that logs each incoming request.
|
|
// Replace with your logger of choice.
|
|
func LoggingMiddleware(next http.Handler) http.Handler {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
// log.Printf("[%s] %s", r.Method, r.URL.Path)
|
|
next.ServeHTTP(w, r)
|
|
})
|
|
}
|