Welcome! Log In Create A New Profile

Advanced

Fwd: Config Guidance

vikrant singh
September 23, 2015 02:24PM
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
Subject Author Posted

Fwd: Config Guidance

vikrant singh September 23, 2015 02:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 289
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready