Fix RFC7235 violation

This commit is contained in:
ggramaize 2018-08-28 12:02:14 +02:00 committed by Andrew Gaul
parent 6760ec46a2
commit 64ad54f670
1 changed files with 1 additions and 1 deletions

View File

@ -113,7 +113,7 @@ func (p *Proxy) handle(w http.ResponseWriter, r *http.Request) error {
// TODO: only HTTPS?
if p.user != "" {
if !p.checkHttpBasicAuth(r.Header.Get("Proxy-Authorization")) {
w.Header().Set("WWW-Authenticate", "Basic realm=\"Compy\"")
w.Header().Set("Proxy-Authenticate", "Basic realm=\"Compy\"")
w.WriteHeader(http.StatusProxyAuthRequired)
return nil
}