Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.1.1

- FIXED system - HTML and JS frontend caches causing failures

## 2.1.0

- ADDED roster - BMS section (available also from Landing page)
Expand Down
5 changes: 5 additions & 0 deletions deploy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,10 @@ server {
proxy_pass http://frontend:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;

# Pass cache headers from frontend nginx
proxy_pass_header Cache-Control;
proxy_pass_header Pragma;
proxy_pass_header Expires;
}
}
16 changes: 15 additions & 1 deletion frontend/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ server {
add_header Cache-Control "no-cache, no-store, must-revalidate";
}

# Never cache index.html (SPA entry point — must always fetch latest)
location = /index.html {
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
add_header Pragma "no-cache" always;
add_header Expires "0" always;
}
Comment thread
sourcery-ai[bot] marked this conversation as resolved.

# API requests → backend (needed for OG bot rewrite)
location ~ ^/api(/.*)?$ {
proxy_pass http://backend:8000;
Expand All @@ -41,7 +48,14 @@ server {
try_files $uri $uri/ /index.html;
}

# Cache static assets
# Vite hashed assets — no SPA fallback, real 404 if missing
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}

# Cache other static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 1y;
add_header Cache-Control "public, immutable";
Expand Down
Loading