mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-10-18 04:41:19 +02:00
Remove GAP-Auth header usage
This commit is contained in:
@@ -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" {
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -58,7 +58,6 @@ const (
|
||||
acceptEncoding = "Accept-Encoding"
|
||||
applicationJSON = "application/json"
|
||||
textPlainUTF8 = "text/plain; charset=utf-8"
|
||||
gapAuth = "Gap-Auth"
|
||||
gapSignature = "Gap-Signature"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user