mirror of
https://git.phreedom.club/localhost_frssoft/compy.git
synced 2024-11-19 14:49:16 +00:00
Fix RFC7235 violation
This commit is contained in:
parent
6760ec46a2
commit
64ad54f670
|
@ -113,7 +113,7 @@ func (p *Proxy) handle(w http.ResponseWriter, r *http.Request) error {
|
||||||
// TODO: only HTTPS?
|
// TODO: only HTTPS?
|
||||||
if p.user != "" {
|
if p.user != "" {
|
||||||
if !p.checkHttpBasicAuth(r.Header.Get("Proxy-Authorization")) {
|
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)
|
w.WriteHeader(http.StatusProxyAuthRequired)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue