nginx: Move common longpolling proxy configuration into include file.

(imported from commit 4ace82824c32cec8c6da8a1a6b8a527dae105a89)
This commit is contained in:
Tim Abbott
2013-12-03 17:12:54 -05:00
parent 9e24558092
commit 21a69f2188
3 changed files with 6 additions and 10 deletions

View File

@@ -16,11 +16,7 @@ location /static/ {
# Send longpoll requests to Tornado
location ~ /json/get_events|/json/events|/api/v1/events {
proxy_pass http://localhost:9993;
include /etc/nginx/zulip-include/proxy;
# Needed for longpolling
proxy_buffering off;
proxy_read_timeout 1200;
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View File

@@ -1,8 +1,5 @@
include /etc/nginx/zulip-include/proxy;
# Needed for xhr_streaming transport
proxy_buffering off;
proxy_read_timeout 1200;
# Longpolling version needed for xhr streaming support
include /etc/nginx/zulip-include/proxy_longpolling;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;

View File

@@ -0,0 +1,3 @@
include /etc/nginx/zulip-include/proxy;
proxy_buffering off;
proxy_read_timeout 1200;