Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

proxy support websocket? #40

Open
crapthings opened this issue Mar 21, 2018 · 3 comments
Open

proxy support websocket? #40

crapthings opened this issue Mar 21, 2018 · 3 comments

Comments

@crapthings
Copy link

No description provided.

@blacklabelops
Copy link
Collaborator

Example or use case?

@blacklabelops
Copy link
Collaborator

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

blacklabelops pushed a commit that referenced this issue Mar 21, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants