1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-03-17 21:18:19 +02:00

Fix: Remove duplicated authentication check (#276)

This commit is contained in:
Maximilian Krauß 2024-04-09 11:51:17 +02:00 committed by GitHub
parent 6a62890445
commit 186f8b1829
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -193,20 +193,6 @@ func middleWareFunc(fn http.HandlerFunc) http.HandlerFunc {
}
}
if auth.UICredentials != nil {
user, pass, ok := r.BasicAuth()
if !ok {
basicAuthResponse(w)
return
}
if !auth.UICredentials.Match(user, pass) {
basicAuthResponse(w)
return
}
}
if !strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {
fn(w, r)
return