Skip to content

Commit ae59fae

Browse files
committed
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.
1 parent 3dd9971 commit ae59fae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

forwardproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func (fp *ForwardProxy) ServeHTTP(w http.ResponseWriter, r *http.Request) (int,
311311
httpserver.WriteSiteNotFound(w, r)
312312
return 0, authErr // current Caddy behavior without forwardproxy
313313
} else {
314-
w.Header().Set("Proxy-Authenticate", "Basic")
314+
w.Header().Set("Proxy-Authenticate", "Basic realm=\"Caddy Secure Web Proxy\"")
315315
return http.StatusProxyAuthRequired, authErr
316316
}
317317
}

0 commit comments

Comments
 (0)