fix: Implement Network-First SW strategy, no-cache headers in Nginx for index.html/sw.js, and auto 401 token cleanup to fix post-redeploy stale cache issues

This commit is contained in:
Richard
2026-07-31 11:23:49 +02:00
parent 2403f1313f
commit ac71b38823
7 changed files with 83 additions and 64 deletions
+3
View File
@@ -30,6 +30,9 @@ export const apiFetch = async (endpoint, options = {}) => {
}
if (!response.ok) {
if (response.status === 401) {
setAuthToken(null);
}
let errorMsg = 'Ein Fehler ist aufgetreten.';
if (data) {
if (typeof data.error === 'string') errorMsg = data.error;