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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user