Set HiddenPage's Content-Type to text/html (#19)

Subsumes #16
This commit is contained in:
sergeyfrolov 2018-01-31 06:50:59 -07:00 committed by GitHub
parent 12605a2195
commit 91e13119f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,6 +190,7 @@ func serveHiddenPage(w http.ResponseWriter, authErr error) (int, error) {
const AuthFail = "Please authenticate yourself to the proxy."
const AuthOk = "Congratulations, you are successfully authenticated to the proxy! Go browse all the things!"
w.Header().Set("Content-Type", "text/html")
if authErr != nil {
w.Header().Set("Proxy-Authenticate", "Basic")
w.WriteHeader(http.StatusProxyAuthRequired)