mirror of https://github.com/zulip/zulip.git
nginx: Use the longpolling proxy configuration on load balancers.
(imported from commit f590e6b1eec2856b5128e310797f8ba58846417a)
This commit is contained in:
parent
21a69f2188
commit
afe167ea58
|
@ -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 {
|
||||
|
|
|
@ -1,3 +1,2 @@
|
|||
include /etc/nginx/zulip-include/proxy;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_buffering off;
|
||||
|
|
Loading…
Reference in New Issue