Fix update oxy
This commit is contained in:
parent
609b2630d7
commit
b722748ec3
5 changed files with 7 additions and 2 deletions
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -1322,7 +1322,7 @@
|
||||||
"roundrobin",
|
"roundrobin",
|
||||||
"utils"
|
"utils"
|
||||||
]
|
]
|
||||||
revision = "fe51048067db50958154cd4040da878b10002a3a"
|
revision = "7d94d212f808222b72fd0b8bb171bfcd4e27ffca"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
name = "github.com/vulcand/predicate"
|
name = "github.com/vulcand/predicate"
|
||||||
|
|
|
@ -19,5 +19,6 @@ logLevel = "DEBUG"
|
||||||
[frontends]
|
[frontends]
|
||||||
[frontends.frontend1]
|
[frontends.frontend1]
|
||||||
backend = "backend1"
|
backend = "backend1"
|
||||||
|
passHostHeader = true
|
||||||
[frontends.frontend1.routes.test_1]
|
[frontends.frontend1.routes.test_1]
|
||||||
rule = "PathPrefix:/ws"
|
rule = "PathPrefix:/ws"
|
||||||
|
|
|
@ -24,5 +24,6 @@ insecureSkipVerify=true
|
||||||
[frontends]
|
[frontends]
|
||||||
[frontends.frontend1]
|
[frontends.frontend1]
|
||||||
backend = "backend1"
|
backend = "backend1"
|
||||||
|
passHostHeader = true
|
||||||
[frontends.frontend1.routes.test_1]
|
[frontends.frontend1.routes.test_1]
|
||||||
rule = "Path:/echo,/ws"
|
rule = "Path:/echo,/ws"
|
||||||
|
|
2
vendor/github.com/vulcand/oxy/buffer/buffer.go
generated
vendored
2
vendor/github.com/vulcand/oxy/buffer/buffer.go
generated
vendored
|
@ -330,7 +330,7 @@ func (b *Buffer) copyRequest(req *http.Request, body io.ReadCloser, bodySize int
|
||||||
o.TransferEncoding = []string{}
|
o.TransferEncoding = []string{}
|
||||||
// http.Transport will close the request body on any error, we are controlling the close process ourselves, so we override the closer here
|
// http.Transport will close the request body on any error, we are controlling the close process ourselves, so we override the closer here
|
||||||
if body == nil {
|
if body == nil {
|
||||||
o.Body = nil
|
o.Body = ioutil.NopCloser(req.Body)
|
||||||
} else {
|
} else {
|
||||||
o.Body = ioutil.NopCloser(body.(io.Reader))
|
o.Body = ioutil.NopCloser(body.(io.Reader))
|
||||||
}
|
}
|
||||||
|
|
3
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
3
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
|
@ -491,6 +491,9 @@ func (f *httpForwarder) copyWebSocketRequest(req *http.Request) (outReq *http.Re
|
||||||
outReq.RequestURI = "" // Outgoing request should not have RequestURI
|
outReq.RequestURI = "" // Outgoing request should not have RequestURI
|
||||||
|
|
||||||
outReq.URL.Host = req.URL.Host
|
outReq.URL.Host = req.URL.Host
|
||||||
|
if !f.passHost {
|
||||||
|
outReq.Host = req.URL.Host
|
||||||
|
}
|
||||||
|
|
||||||
outReq.Header = make(http.Header)
|
outReq.Header = make(http.Header)
|
||||||
// gorilla websocket use this header to set the request.Host tested in checkSameOrigin
|
// gorilla websocket use this header to set the request.Host tested in checkSameOrigin
|
||||||
|
|
Loading…
Reference in a new issue