Skip to content

Commit

Permalink
Add Cache-Control: public, no-transform to static assets (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
jake-low authored Sep 10, 2024
1 parent 046ede8 commit 627d73f
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 627d73f

Please sign in to comment.