saidimu/nginx-proxy — pull request #1 by saidimu (2014-10-09 03:14:05+00:00)
Title: Websockets support

Added `Upgrade` and `Connection` headers to the template to allow nginx to [upgrade a request](http://nginx.com/blog/websocket-nginx/).

```
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
```

These headers are only added if a `WEBSOCKETS` environment variable is defined.

To preview these changes, I pushed a trusted Docker image to the [DockerHub registry] (https://registry.hub.docker.com/u/saidimu/nginx-proxy/).

```
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock saidimu/nginx-proxy
```
```
docker run -e VIRTUAL_HOST=foo.bar.com -e WEBSOCKETS=1 ...
```