Skip to content

Commit c34913b

Browse files
alexmvtimabbott
authored andcommitted
nginx: Limit access to internal endpoints, to localhost.
1 parent 5bc4d39 commit c34913b

File tree

1 file changed

+10
-0
lines changed
  • puppet/zulip/files/nginx/zulip-include-frontend

1 file changed

+10
-0
lines changed

puppet/zulip/files/nginx/zulip-include-frontend/app

+10
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ location /user_uploads {
102102
include uwsgi_params;
103103
}
104104

105+
location /api/internal/ {
106+
# These only need be accessed from localhost
107+
allow 127.0.0.1;
108+
allow ::1;
109+
deny all;
110+
111+
include /etc/nginx/zulip-include/api_headers;
112+
include uwsgi_params;
113+
}
114+
105115
# Send all API routes not covered above to Django via uWSGI
106116
location /api/ {
107117
include /etc/nginx/zulip-include/api_headers;

0 commit comments

Comments
 (0)