It seems I sent to wrong mailing list... got no response. So forwarding
this question at "nginx@nginx.org"
---------- Forwarded message ----------
From: vikrant singh <vikrant.thakur@gmail.com>
Date: Tue, Sep 22, 2015 at 12:38 PM
Subject: Config Guidance
To: nginx-forum@nginx.us
Hello,
I have quick question on config. On my reverse proxy I need to serve both
web-socket and normal http request.
For websocket request I add following in request...
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
proxy_pass $servAdd;
And for normal ones I just do
proxy_pass $servAdd;
My question is how to unify these two in a single location directive? I can
identify a websocket request and add extra header in a if block. But as
using if is not recommended I am not sure if I should do that.
Any advise?
Thanks,
Vikrant
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx