Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

puppet: Use two location blocks, instead of nesting them.

Alex Vandiveref188af82d04
diff --git a/puppet/zulip/files/nginx/zulip-include-frontend/app b/puppet/zulip/files/nginx/zulip-include-frontend/app
index 8aa79bcdd55..16631b6f7a2 100644
--- a/puppet/zulip/files/nginx/zulip-include-frontend/app
+++ b/puppet/zulip/files/nginx/zulip-include-frontend/app
@@ -14,11 +14,17 @@ location /static/ {
# Set a nonexistent path, so we just serve the nice Django 404 page.
error_page 404 /django_static_404.html;
+}
- # These files are hashed and thus immutable; cache them aggressively.
- location /static/webpack-bundles {
- add_header Cache-Control "public, max-age=31536000, immutable";
- }
+# These files are hashed and thus immutable; cache them aggressively.
+location /static/webpack-bundles/ {
+ alias /home/zulip/prod-static/webpack-bundles/;
+ include /etc/nginx/zulip-include/headers;
+ add_header Access-Control-Allow-Origin *;
+ add_header Cache-Control "public, max-age=31536000, immutable";
+
+ # Set a nonexistent path, so we just serve the nice Django 404 page.
+ error_page 404 /django_static_404.html;
}
# Send longpoll requests to Tornado