Remove GAP-Auth header usage

This commit is contained in:
Joel Speed
2020-10-04 17:08:47 +01:00
parent 2e72d151e2
commit b845867cd1
6 changed files with 10 additions and 23 deletions
-2
View File
@@ -36,7 +36,6 @@ var SignatureHeaders = []string{
"X-Forwarded-Preferred-User",
"X-Forwarded-Access-Token",
"Cookie",
"Gap-Auth",
}
// newHTTPUpstreamProxy creates a new httpUpstreamProxy that can serve requests
@@ -85,7 +84,6 @@ func (h *httpUpstreamProxy) ServeHTTP(rw http.ResponseWriter, req *http.Request)
scope.Upstream = h.upstream
if h.auth != nil {
req.Header.Set("GAP-Auth", rw.Header().Get("GAP-Auth"))
h.auth.SignRequest(req)
}
if h.wsHandler != nil && strings.EqualFold(req.Header.Get("Connection"), "upgrade") && req.Header.Get("Upgrade") == "websocket" {
+1 -2
View File
@@ -226,8 +226,7 @@ var _ = Describe("HTTP Upstream Suite", func() {
Method: "GET",
URL: "http://example.localhost/withSignature",
Header: map[string][]string{
gapAuth: {""},
gapSignature: {"sha256 osMWI8Rr0Zr5HgNq6wakrgJITVJQMmFN1fXCesrqrmM="},
gapSignature: {"sha256 md39qRfodR3ya5kMZxDS5nMXtG3BZoh4DUTkrXqLtow="},
},
Body: []byte{},
Host: "example.localhost",
+1 -2
View File
@@ -123,8 +123,7 @@ var _ = Describe("Proxy Suite", func() {
Method: "GET",
URL: "http://example.localhost/http/1234",
Header: map[string][]string{
"Gap-Auth": {""},
"Gap-Signature": {"sha256 ofB1u6+FhEUbFLc3/uGbJVkl7GaN4egFqVvyO3+2I1w="},
"Gap-Signature": {"sha256 yu9y53XTRAnczM51Nv6LAbeU2mI577iUPeK8zHuY9MM="},
},
Body: []byte{},
Host: "example.localhost",
-1
View File
@@ -58,7 +58,6 @@ const (
acceptEncoding = "Accept-Encoding"
applicationJSON = "application/json"
textPlainUTF8 = "text/plain; charset=utf-8"
gapAuth = "Gap-Auth"
gapSignature = "Gap-Signature"
)