forked from SW/traefik
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7b0cef0fac | ||
|
|
919295cffc | ||
|
|
78544f7fa2 | ||
|
|
40e18db838 |
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,5 +1,17 @@
|
||||
# Change Log
|
||||
|
||||
## [v1.3.7](https://github.com/containous/traefik/tree/v1.3.7) (2017-08-25)
|
||||
[All Commits](https://github.com/containous/traefik/compare/v1.3.6...v1.3.7)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[oxy]** Only forward X-Forwarded-Port. ([#2007](https://github.com/containous/traefik/pull/2007) by [ldez](https://github.com/ldez))
|
||||
|
||||
## [v1.3.6](https://github.com/containous/traefik/tree/v1.3.6) (2017-08-20)
|
||||
[All Commits](https://github.com/containous/traefik/compare/v1.3.5...v1.3.6)
|
||||
|
||||
**Bug fixes:**
|
||||
- **[oxy,websocket]** Websocket parameters and protocol. ([#1970](https://github.com/containous/traefik/pull/1970) by [ldez](https://github.com/ldez))
|
||||
|
||||
## [v1.3.5](https://github.com/containous/traefik/tree/v1.3.5) (2017-08-01)
|
||||
[All Commits](https://github.com/containous/traefik/compare/v1.3.4...v1.3.5)
|
||||
|
||||
|
||||
6
glide.lock
generated
6
glide.lock
generated
@@ -1,5 +1,5 @@
|
||||
hash: eddc889b1c0fc19ad91d886268e46ebdf85cd9e376e78b96b0d6661cc5842aca
|
||||
updated: 2017-06-29T16:47:14.848940186+02:00
|
||||
hash: 110ae989ba77357a6d7cc720f671765b06857cf447296a294a461acd2574a020
|
||||
updated: 2017-08-25T11:52:16.848940186+02:00
|
||||
imports:
|
||||
- name: cloud.google.com/go
|
||||
version: 2e6a95edb1071d750f6d7db777bf66cd2997af6c
|
||||
@@ -411,7 +411,7 @@ imports:
|
||||
- name: github.com/vdemeester/docker-events
|
||||
version: be74d4929ec1ad118df54349fda4b0cba60f849b
|
||||
- name: github.com/vulcand/oxy
|
||||
version: 05a57556d820dc5c56721ebdefbafc15f36fac98
|
||||
version: 7baa97f97557ff96be2798972dc831c7ba0a46e7
|
||||
repo: https://github.com/containous/oxy.git
|
||||
vcs: git
|
||||
subpackages:
|
||||
|
||||
@@ -8,7 +8,7 @@ import:
|
||||
- package: github.com/cenk/backoff
|
||||
- package: github.com/containous/flaeg
|
||||
- package: github.com/vulcand/oxy
|
||||
version: 05a57556d820dc5c56721ebdefbafc15f36fac98
|
||||
version: 7baa97f97557ff96be2798972dc831c7ba0a46e7
|
||||
repo: https://github.com/containous/oxy.git
|
||||
vcs: git
|
||||
subpackages:
|
||||
|
||||
9
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
9
vendor/github.com/vulcand/oxy/forward/fwd.go
generated
vendored
@@ -258,7 +258,6 @@ func (f *websocketForwarder) serveHTTP(w http.ResponseWriter, req *http.Request,
|
||||
if outReq.URL.Scheme == "wss" && f.TLSClientConfig != nil {
|
||||
dialer.TLSClientConfig = f.TLSClientConfig
|
||||
}
|
||||
|
||||
targetConn, resp, err := dialer.Dial(outReq.URL.String(), outReq.Header)
|
||||
if err != nil {
|
||||
ctx.log.Errorf("Error dialing `%v`: %v", outReq.Host, err)
|
||||
@@ -308,7 +307,6 @@ func (f *websocketForwarder) copyRequest(req *http.Request, u *url.URL) (outReq
|
||||
|
||||
outReq.URL = utils.CopyURL(req.URL)
|
||||
outReq.URL.Scheme = u.Scheme
|
||||
outReq.URL.Path = outReq.RequestURI
|
||||
|
||||
//sometimes backends might be registered as HTTP/HTTPS servers so translate URLs to websocket URLs.
|
||||
switch u.Scheme {
|
||||
@@ -318,9 +316,12 @@ func (f *websocketForwarder) copyRequest(req *http.Request, u *url.URL) (outReq
|
||||
outReq.URL.Scheme = "ws"
|
||||
}
|
||||
|
||||
if requestURI, err := url.ParseRequestURI(outReq.RequestURI); err == nil {
|
||||
outReq.URL.Path = requestURI.Path
|
||||
outReq.URL.RawQuery = requestURI.RawQuery
|
||||
}
|
||||
|
||||
outReq.URL.Host = u.Host
|
||||
// raw query is already included in RequestURI, so ignore it to avoid dupes
|
||||
outReq.URL.RawQuery = ""
|
||||
|
||||
outReq.Header = make(http.Header)
|
||||
//gorilla websocket use this header to set the request.Host tested in checkSameOrigin
|
||||
|
||||
3
vendor/github.com/vulcand/oxy/forward/headers.go
generated
vendored
3
vendor/github.com/vulcand/oxy/forward/headers.go
generated
vendored
@@ -4,6 +4,7 @@ const (
|
||||
XForwardedProto = "X-Forwarded-Proto"
|
||||
XForwardedFor = "X-Forwarded-For"
|
||||
XForwardedHost = "X-Forwarded-Host"
|
||||
XForwardedPort = "X-Forwarded-Port"
|
||||
XForwardedServer = "X-Forwarded-Server"
|
||||
Connection = "Connection"
|
||||
KeepAlive = "Keep-Alive"
|
||||
@@ -18,7 +19,6 @@ const (
|
||||
SecWebsocketKey = "Sec-Websocket-Key"
|
||||
SecWebsocketVersion = "Sec-Websocket-Version"
|
||||
SecWebsocketExtensions = "Sec-Websocket-Extensions"
|
||||
SecWebsocketProtocol = "Sec-Websocket-Protocol"
|
||||
SecWebsocketAccept = "Sec-Websocket-Accept"
|
||||
)
|
||||
|
||||
@@ -42,7 +42,6 @@ var WebsocketDialHeaders = []string{
|
||||
SecWebsocketKey,
|
||||
SecWebsocketVersion,
|
||||
SecWebsocketExtensions,
|
||||
SecWebsocketProtocol,
|
||||
SecWebsocketAccept,
|
||||
}
|
||||
|
||||
|
||||
4
vendor/github.com/vulcand/oxy/forward/rewrite.go
generated
vendored
4
vendor/github.com/vulcand/oxy/forward/rewrite.go
generated
vendored
@@ -32,6 +32,10 @@ func (rw *HeaderRewriter) Rewrite(req *http.Request) {
|
||||
req.Header.Set(XForwardedProto, "http")
|
||||
}
|
||||
|
||||
if xfp := req.Header.Get(XForwardedPort); xfp != "" && rw.TrustForwardHeader {
|
||||
req.Header.Set(XForwardedPort, xfp)
|
||||
}
|
||||
|
||||
if xfh := req.Header.Get(XForwardedHost); xfh != "" && rw.TrustForwardHeader {
|
||||
req.Header.Set(XForwardedHost, xfh)
|
||||
} else if req.Host != "" {
|
||||
|
||||
2
vendor/github.com/vulcand/oxy/roundrobin/stickysessions.go
generated
vendored
2
vendor/github.com/vulcand/oxy/roundrobin/stickysessions.go
generated
vendored
@@ -38,7 +38,7 @@ func (s *StickySession) GetBackend(req *http.Request, servers []*url.URL) (*url.
|
||||
}
|
||||
|
||||
func (s *StickySession) StickBackend(backend *url.URL, w *http.ResponseWriter) {
|
||||
c := &http.Cookie{Name: s.cookiename, Value: backend.String()}
|
||||
c := &http.Cookie{Name: s.cookiename, Value: backend.String(), Path: "/"}
|
||||
http.SetCookie(*w, c)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user