Open crapthings opened 6 years ago
I would suggest a new environment variable SERVERXREVERSE_PROXY_WEBSOCKETY
with values true
or false
. false
default.
For adding the following elements to a proxy definition:
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; #for websockets
proxy_set_header Connection $connection_upgrade;
Should work like this
$ docker run -d \
-p 80:80 \
--name nginx \
-e "SERVER1REVERSE_PROXY_LOCATION1=/" \
-e "SERVER1REVERSE_PROXY_PASS1=http://www.heise.de/" \
-e "SERVER1REVERSE_PROXY_LOCATION2=/alternate" \
-e "SERVER1REVERSE_PROXY_PASS2=http://www.alternate.de/" \
-e "SERVER1REVERSE_PROXY_WEBSOCKET2=true" \
blacklabelops/nginx
Example or use case?