fix: only keep header Authorization & Content-Type
This commit is contained in:
parent
4c0dc50af0
commit
0198df5962
@ -24,12 +24,12 @@ func Relay(c *gin.Context) {
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
req.Header = c.Request.Header.Clone()
|
//req.Header = c.Request.Header.Clone()
|
||||||
// Fix HTTP Decompression failed
|
// Fix HTTP Decompression failed
|
||||||
// https://github.com/stoplightio/prism/issues/1064#issuecomment-824682360
|
// https://github.com/stoplightio/prism/issues/1064#issuecomment-824682360
|
||||||
req.Header.Del("Accept-Encoding")
|
//req.Header.Del("Accept-Encoding")
|
||||||
// Fix http2: invalid Connection request header: ["upgrade"]
|
req.Header.Set("Authorization", c.Request.Header.Get("Authorization"))
|
||||||
req.Header.Del("Upgrade")
|
req.Header.Set("Content-Type", c.Request.Header.Get("Content-Type"))
|
||||||
client := &http.Client{}
|
client := &http.Client{}
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
|
Loading…
Reference in New Issue
Block a user