17 lines
318 B
Go
17 lines
318 B
Go
package middlewares
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.secnex.io/secnex/masterlog"
|
|
)
|
|
|
|
func HostMiddleware(next http.Handler) http.Handler {
|
|
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
masterlog.Info("HostMiddleware", map[string]interface{}{
|
|
"host": r.Host,
|
|
})
|
|
next.ServeHTTP(w, r)
|
|
})
|
|
}
|