mirror of
https://github.com/axllent/mailpit.git
synced 2025-08-13 20:04:49 +02:00
Fix: Remove duplicated authentication check (#276)
This commit is contained in:
@@ -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") {
|
if !strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {
|
||||||
fn(w, r)
|
fn(w, r)
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user