nginx: Use the longpolling proxy configuration on load balancers.

(imported from commit f590e6b1eec2856b5128e310797f8ba58846417a)
This commit is contained in:
Tim Abbott 2013-12-03 17:19:04 -05:00
parent 21a69f2188
commit afe167ea58
2 changed files with 36 additions and 1 deletions

View File

@ -27,6 +27,12 @@ server {
proxy_pass https://staging;
include /etc/nginx/zulip-include/location-sockjs;
}
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass https://staging/;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
@ -46,6 +52,12 @@ server {
proxy_pass https://prod;
include /etc/nginx/zulip-include/location-sockjs;
}
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass https://prod/;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
@ -64,6 +76,12 @@ server {
proxy_pass https://staging;
include /etc/nginx/zulip-include/location-sockjs;
}
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass https://prod/;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
@ -83,6 +101,12 @@ server {
proxy_pass https://prod;
include /etc/nginx/zulip-include/location-sockjs;
}
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass https://prod/;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {
@ -101,6 +125,12 @@ server {
proxy_pass https://prod;
include /etc/nginx/zulip-include/location-sockjs;
}
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass https://prod/;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
@ -120,6 +150,12 @@ server {
proxy_pass https://prod;
include /etc/nginx/zulip-include/location-sockjs;
}
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass https://prod/;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
server {

View File

@ -1,3 +1,2 @@
include /etc/nginx/zulip-include/proxy;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_buffering off;