tornado: Move internal tornado redirect to under /internal/.

This commit is contained in:
Alex Vandiver 2022-12-09 00:23:05 +00:00 committed by Alex Vandiver
parent cc9b028312
commit b20ecabf8f
2 changed files with 3 additions and 2 deletions

View File

@ -43,7 +43,7 @@ location /api/v1/events {
}
# Handle X-Accel-Redirect from Tornado to Tornado
location ~ ^/tornado/(\d+)(/.*)$ {
location ~ ^/internal/tornado/(\d+)(/.*)$ {
internal;
proxy_pass http://tornado$1$2$is_args$args;
include /etc/nginx/zulip-include/proxy_longpolling;

View File

@ -98,7 +98,8 @@ def get_events(request: HttpRequest, user_profile: UserProfile) -> HttpResponse:
# which is efficient and keeps this redirect invisible to
# clients.
return HttpResponse(
"", headers={"X-Accel-Redirect": f"/tornado/{user_port}{request.get_full_path()}"}
"",
headers={"X-Accel-Redirect": f"/internal/tornado/{user_port}{request.get_full_path()}"},
)
return get_events_backend(request, user_profile)