Skip to content

Commit

Permalink
Add Cache-Control: public, no-transform to static assets
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low committed Sep 5, 2024
1 parent d76f441 commit 4d4d8aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/nginx-config
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ server {
proxy_set_header Connection "upgrade";
proxy_http_version 1.1;
}
location ~ (/api/|/auth/|/docs/|/assets/lib/|/assets/swagger.json) {
location ~ ^(/api/|/auth/|/docs/|/assets/lib/|/assets/swagger.json) {
proxy_pass http://api;

include mime.types;
Expand All @@ -35,4 +35,8 @@ server {
proxy_set_header Host $http_host;
proxy_http_version 1.1;
}
location ~ ^(/assets/|/static/) {
root /var/www/maproulette;
add_header Cache-Control "public, no-transform";
}
}

0 comments on commit 4d4d8aa

Please sign in to comment.