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 committed 2026-07-31 11:23:49 +02:00
1 parent 2403f1313f
commit ac71b38823
7 files changed
+83 -64

No files matched your search

+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;