From 91e13119f38eca64266284ee1afd957b67685535 Mon Sep 17 00:00:00 2001 From: sergeyfrolov Date: Wed, 31 Jan 2018 06:50:59 -0700 Subject: [PATCH] Set HiddenPage's Content-Type to text/html (#19) Subsumes #16 --- forwardproxy.go | 1 + 1 file changed, 1 insertion(+) diff --git a/forwardproxy.go b/forwardproxy.go index 9be8d9a..52ca353 100644 --- a/forwardproxy.go +++ b/forwardproxy.go @@ -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)