fix(front): try to correct crash on ios
Some checks failed
Deploy to Development / build-and-deploy (push) Has been cancelled
Deploy to Production / build-and-deploy (push) Successful in 1m39s

This commit is contained in:
EvanChal
2026-01-26 23:03:49 +01:00
parent 08810440e0
commit 658b7a9dda
10 changed files with 149 additions and 48 deletions

View File

@@ -211,7 +211,11 @@ module.exports = defineConfig(({ command, mode }) => {
}
},
{
urlPattern: /^https?:\/\/.*\/api\/.*/i,
// Intercepter uniquement les requêtes GET pour l'API
urlPattern: ({ url, request }) => {
const urlString = url.href || url.toString()
return /^https?:\/\/.*\/api\/.*/i.test(urlString) && request.method === 'GET'
},
handler: 'NetworkFirst',
options: {
cacheName: 'api-cache',