Skip to content
Snippets Groups Projects
Commit a9ca7881 authored by Julian's avatar Julian
Browse files

Serve cached legacy pages when response has HTTP error code

parent a897ae55
No related branches found
No related tags found
1 merge request!1154Resolve "Verify maintenance mode with GraphQL / reimplement maintenance mode handling"
......@@ -236,6 +236,16 @@ export default defineConfig({
"PWA-Is-Cacheable": "true",
},
},
plugins: [
{
fetchDidSucceed: async ({ request, response }) => {
if (response.ok) {
return response;
}
throw new Error(`${response.status} ${response.statusText}`);
},
}
],
},
},
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment