diff --git a/puppet/zulip/files/nginx/zulip-include-frontend/app b/puppet/zulip/files/nginx/zulip-include-frontend/app index 4b7e76e13e..e7ff52ad0f 100644 --- a/puppet/zulip/files/nginx/zulip-include-frontend/app +++ b/puppet/zulip/files/nginx/zulip-include-frontend/app @@ -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; diff --git a/zerver/tornado/views.py b/zerver/tornado/views.py index 3f511bde20..2d96b3aa2f 100644 --- a/zerver/tornado/views.py +++ b/zerver/tornado/views.py @@ -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)