mirror of
https://github.com/penpot/penpot.git
synced 2025-12-11 22:14:05 +01:00
✨ Add better cache config on devenv nginx
This commit is contained in:
@@ -223,15 +223,20 @@ http {
|
|||||||
add_header X-Cache-Status $upstream_cache_status;
|
add_header X-Cache-Status $upstream_cache_status;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* \.(js|css|jpg|png|svg|ttf|woff|woff2|wasm)$ {
|
location ~* \.(jpg|png|svg|ttf|woff|woff2)$ {
|
||||||
add_header Cache-Control "public, max-age=604800" always; # 7 days
|
add_header Cache-Control "public, max-age=604800" always; # 7 days
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~* \.(js|css|wasm)$ {
|
||||||
|
# This only makes sense on PROD
|
||||||
|
# add_header Cache-Control "public, max-age=604800" always; # 7 days
|
||||||
|
}
|
||||||
|
|
||||||
location ~ ^/[^/]+/(.*)$ {
|
location ~ ^/[^/]+/(.*)$ {
|
||||||
return 301 " /404";
|
return 301 " /404";
|
||||||
}
|
}
|
||||||
|
|
||||||
add_header Cache-Control "no-store, no-cache, max-age=0" always;
|
add_header Cache-Control "no-store" always;
|
||||||
try_files $uri /index.html$is_args$args /index.html =404;
|
try_files $uri /index.html$is_args$args /index.html =404;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user