mirror of https://github.com/zulip/zulip.git
nginx: Replace unanchored regexes in location directives.
We could anchor the regexes, but there’s no need for the power (and responsibility) of regexes here. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
b29c44ed94
commit
c0ffa71fa9
|
@ -17,7 +17,7 @@ location /static/ {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Send longpoll requests to Tornado
|
# Send longpoll requests to Tornado
|
||||||
location ~ /json/events {
|
location /json/events {
|
||||||
proxy_pass http://tornado;
|
proxy_pass http://tornado;
|
||||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,12 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
# We don't need /api/v1/events/internal, because that doesn't go through the loadbalancer.
|
# We don't need /api/v1/events/internal, because that doesn't go through the loadbalancer.
|
||||||
location ~ /json/events|/api/v1/events {
|
location /json/events {
|
||||||
|
proxy_pass https://staging;
|
||||||
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/v1/events {
|
||||||
proxy_pass https://staging;
|
proxy_pass https://staging;
|
||||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
}
|
}
|
||||||
|
@ -58,7 +63,12 @@ server {
|
||||||
include /etc/nginx/zulip-include/proxy;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /json/events|/api/v1/events {
|
location /json/events {
|
||||||
|
proxy_pass https://prod;
|
||||||
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/v1/events {
|
||||||
proxy_pass https://prod;
|
proxy_pass https://prod;
|
||||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
}
|
}
|
||||||
|
@ -81,7 +91,12 @@ server {
|
||||||
include /etc/nginx/zulip-include/proxy;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /json/events|/api/v1/events {
|
location /json/events {
|
||||||
|
proxy_pass https://prod;
|
||||||
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/v1/events {
|
||||||
proxy_pass https://prod;
|
proxy_pass https://prod;
|
||||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
}
|
}
|
||||||
|
@ -100,7 +115,12 @@ server {
|
||||||
include /etc/nginx/zulip-include/proxy;
|
include /etc/nginx/zulip-include/proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /json/events|/api/v1/events {
|
location /json/events {
|
||||||
|
proxy_pass https://prod;
|
||||||
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /api/v1/events {
|
||||||
proxy_pass https://prod;
|
proxy_pass https://prod;
|
||||||
include /etc/nginx/zulip-include/proxy_longpolling;
|
include /etc/nginx/zulip-include/proxy_longpolling;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue