Add realm to Proxy-Authenticate with probe resist (#58)
In #53 we added a realm to the Proxy-Authenticate header, but the realm only is added, when `probe_resistance` is off. With this change, Proxy-Authenticate header will have a realm when `probe_resistance` is on as well.
This commit is contained in:
parent
7af135a175
commit
694cbc9ec0
1 changed files with 1 additions and 1 deletions
|
|
@ -212,7 +212,7 @@ func serveHiddenPage(w http.ResponseWriter, authErr error) (int, error) {
|
|||
|
||||
w.Header().Set("Content-Type", "text/html")
|
||||
if authErr != nil {
|
||||
w.Header().Set("Proxy-Authenticate", "Basic")
|
||||
w.Header().Set("Proxy-Authenticate", "Basic realm=\"Caddy Secure Web Proxy\"")
|
||||
w.WriteHeader(http.StatusProxyAuthRequired)
|
||||
w.Write([]byte(fmt.Sprintf(hiddenPage, AuthFail)))
|
||||
return 0, authErr
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue