mirror of
https://github.com/appwrite/console.git
synced 2026-06-06 19:27:48 +00:00
Add cache headers for console static assets
Configure 1-day caching with revalidation for images, CSS, fonts, and icons in the /console path to improve performance while ensuring freshness.
This commit is contained in:
+7
-2
@@ -4,7 +4,6 @@ server {
|
||||
|
||||
gzip_static on;
|
||||
|
||||
# Set root for all locations
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# Security headers for all locations
|
||||
@@ -22,11 +21,17 @@ server {
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
# Cache, but revalidate, for images, css, fonts, and icons folders
|
||||
location ~* ^/console/(images|css|fonts|icons)/ {
|
||||
expires 1d;
|
||||
add_header Cache-Control "public, must-revalidate";
|
||||
}
|
||||
|
||||
# All other /console requests (no cache)
|
||||
location /console {
|
||||
index index.html index.html;
|
||||
try_files $uri /console/index.html;
|
||||
|
||||
|
||||
expires 0;
|
||||
add_header Cache-Control "no-store";
|
||||
add_header Pragma "no-cache";
|
||||
|
||||
Reference in New Issue
Block a user