mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-01 18:01:28 -06:00
add missing www-authentication header on failed authentication
This commit is contained in:
@@ -87,6 +87,7 @@ func Authentication(auths []Authenticator, opts ...Option) func(next http.Handle
|
||||
}
|
||||
}
|
||||
if !isPublicPath(r.URL.Path) {
|
||||
writeSupportedAuthenticateHeader(w, r)
|
||||
for _, s := range SupportedAuthStrategies {
|
||||
userAgentAuthenticateLockIn(w, r, options.CredentialsByUserAgent, s)
|
||||
}
|
||||
@@ -178,6 +179,7 @@ func userAgentAuthenticateLockIn(w http.ResponseWriter, r *http.Request, locks m
|
||||
for _, r := range ProxyWwwAuthenticate {
|
||||
evalRequestURI(u, r)
|
||||
}
|
||||
fmt.Println(w.Header())
|
||||
}
|
||||
|
||||
func evalRequestURI(l userAgentLocker, r regexp.Regexp) {
|
||||
|
||||
Reference in New Issue
Block a user