From 188d63c6b824361824822c93ec0d2e86ca381cad Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Fri, 13 Nov 2020 01:14:05 +0000 Subject: [PATCH] Fix #298 --- internal/httpproxy/auth.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/httpproxy/auth.go b/internal/httpproxy/auth.go index 94096637..3b48e71f 100644 --- a/internal/httpproxy/auth.go +++ b/internal/httpproxy/auth.go @@ -10,6 +10,7 @@ func isAuthorized(responseWriter http.ResponseWriter, request *http.Request, username, password string) (authorized bool) { basicAuth := request.Header.Get("Proxy-Authorization") if len(basicAuth) == 0 { + responseWriter.Header().Set("Proxy-Authenticate", `Basic realm="Access to Gluetun over HTTP"`) responseWriter.WriteHeader(http.StatusProxyAuthRequired) return false }