deis / router

Edge router for Deis Workflow

Home Page:https://deis.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deis Router does not allow for X-Forwarded-Proto to be "wss"

dtomcej opened this issue · comments

The deis router does not allow for a currently existing X-Forwarded-Proto to be "wss" for websockets. It instead rewrites the proto to be "http"

An example of this is using a whoami container to test:

curl --verbose --header 'Host:whoami.example.com' --header 'X-Forwarded-Proto: wss' 192.168.2.100
* Rebuilt URL to: 192.168.1.100/
*   Trying 192.168.1.100...
* Connected to 192.168.1.100 (192.168.1.100) port 80 (#0)
> GET / HTTP/1.1
> Host:whoami.example.com
> User-Agent: curl/7.43.0
> Accept: */*
> X-Forwarded-Proto: wss
> 
< HTTP/1.1 200 OK
< Server: nginx/1.10.1
< Date: Tue, 30 Aug 2016 20:08:05 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 273
< Connection: keep-alive
< Vary: Accept-Encoding
< 
Hostname: whoami-v2-cmd-7smgh
IP: 127.0.0.1
IP: ::1
IP: 10.2.52.12
IP: fe80::42:aff:fe02:340c
GET / HTTP/1.1
Host: whoami.example.com
User-Agent: curl/7.43.0
Connection: close
Accept: */*
Connection: close
X-Forwarded-For: 10.2.52.0
X-Forwarded-Proto: http