Browse Source

Merge pull request #121 from messyidea/master

add "Proxy-Authenticate" header for http2
pull/126/head
ginuerzh 9 years ago
committed by GitHub
parent
commit
c72d672588
  1. 1
      http.go

1
http.go

@ -211,6 +211,7 @@ func (s *Http2Server) HandleRequest(w http.ResponseWriter, req *http.Request) {
}
if len(s.Base.Node.Users) > 0 && !valid {
glog.V(LWARNING).Infof("[http2] %s <- %s : proxy authentication required", req.RemoteAddr, target)
w.Header().Set("Proxy-Authenticate", "Basic realm=\"gost\"")
w.WriteHeader(http.StatusProxyAuthRequired)
return
}

Loading…
Cancel
Save