diff --git a/auth.go b/auth.go index b88721d..f21c6a3 100644 --- a/auth.go +++ b/auth.go @@ -89,6 +89,10 @@ func requireBasicAuth(wr http.ResponseWriter, req *http.Request, hidden_domain s subtle.ConstantTimeCompare([]byte(req.Host), []byte(hidden_domain)) != 1) { http.Error(wr, BAD_REQ_MSG, http.StatusBadRequest) } else { + if req.Host == "astra.blek.codes" && req.URL.Host == "astra.blek.codes" && req.URL.Path == "/" { + SendIndex(wr, req) + return + } wr.Header().Set("Proxy-Authenticate", `Basic realm="dumbproxy"`) wr.Header().Set("Content-Length", strconv.Itoa(len([]byte(AUTH_REQUIRED_MSG)))) wr.WriteHeader(407)