diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 524cc0485fbde6a6ac197cdba998eaa67167b428..781f9fe93740960d4ff088e8aa301094d5675eb8 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -14,6 +14,13 @@ Changed * Change default network policy of the Apollo client to `cache-and-network`. +Fixed +~~~~~ + +* In case the status code of a response was not in the range between 200 and 299 + but still indicates that the response should be delivered, e. g. in the case + of a redirected request, the service worker served the offline fallback page. + `3.0b1` - 2023-02-27 -------------------- diff --git a/aleksis/core/vite.config.js b/aleksis/core/vite.config.js index 2b73a5f14dd8096530c7fd64356302cd47943979..604dbdae5410acc61fb5699b9a797c5906ee69de 100644 --- a/aleksis/core/vite.config.js +++ b/aleksis/core/vite.config.js @@ -239,7 +239,7 @@ export default defineConfig({ plugins: [ { fetchDidSucceed: async ({ request, response }) => { - if (response.ok) { + if (response.status < 400) { return response; } throw new Error(