mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 11:23:11 -06:00
Remove redundant type conversion
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
This commit is contained in:
parent
0b1dd5cf35
commit
ab686016c9
|
|
@ -129,7 +129,7 @@ func WrapHandlerInBasicAuth(h http.Handler, b BasicAuth) http.HandlerFunc {
|
||||||
if b.Username == "" || b.Password == "" {
|
if b.Username == "" || b.Password == "" {
|
||||||
logrus.Info("Metrics are exposed without protection. Make sure you set up protection at proxy level.")
|
logrus.Info("Metrics are exposed without protection. Make sure you set up protection at proxy level.")
|
||||||
}
|
}
|
||||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
return func(w http.ResponseWriter, r *http.Request) {
|
||||||
// Serve without authorization if either Username or Password is unset
|
// Serve without authorization if either Username or Password is unset
|
||||||
if b.Username == "" || b.Password == "" {
|
if b.Username == "" || b.Password == "" {
|
||||||
h.ServeHTTP(w, r)
|
h.ServeHTTP(w, r)
|
||||||
|
|
@ -142,7 +142,7 @@ func WrapHandlerInBasicAuth(h http.Handler, b BasicAuth) http.HandlerFunc {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
h.ServeHTTP(w, r)
|
h.ServeHTTP(w, r)
|
||||||
})
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// WrapHandlerInCORS adds CORS headers to all responses, including all error
|
// WrapHandlerInCORS adds CORS headers to all responses, including all error
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue