mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Expose RequestLogger
This commit is contained in:
parent
c1ece10b79
commit
ff919c7342
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ func RegisterAdditionalRoute(path string, handler http.Handler) {
|
|||
additionalRoutes[path] = handler
|
||||
}
|
||||
|
||||
func logger(next http.Handler) http.Handler {
|
||||
func RequestLogger(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
ew := NewEnrichedResponseWriter(w)
|
||||
next.ServeHTTP(ew, r)
|
||||
|
@ -36,7 +36,7 @@ func Serve() {
|
|||
router.Handle(path, handler)
|
||||
}
|
||||
|
||||
router.Use(logger)
|
||||
router.Use(RequestLogger)
|
||||
|
||||
http.Handle("/", router)
|
||||
http.HandleFunc("/api/database/v1", startDatabaseAPI)
|
||||
|
|
Loading…
Add table
Reference in a new issue