Add realm to Proxy-Authenticate header
Resolves #52 Squid's default realm is "Squid proxy-caching web server", so I decided to give descriptive realm to Caddy as well.
This commit is contained in:
parent
3dd9971580
commit
ae59fae1dc
1 changed files with 1 additions and 1 deletions
|
|
@ -311,7 +311,7 @@ func (fp *ForwardProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int,
|
|||
httpserver.WriteSiteNotFound(w, r)
|
||||
return 0, authErr // current Caddy behavior without forwardproxy
|
||||
} else {
|
||||
w.Header().Set("Proxy-Authenticate", "Basic")
|
||||
w.Header().Set("Proxy-Authenticate", "Basic realm=\"Caddy Secure Web Proxy\"")
|
||||
return http.StatusProxyAuthRequired, authErr
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue