You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 23, 2021. It is now read-only.
{
"staticFileGlobs": [
"dist/public/app/*",
"dist/public/manifest_icons/*",
"dist/public/fonts/*",
"dist/public/*"
],
"stripPrefix": "dist/public/",
"runtimeCaching": [{
"urlPattern": "/^https:\/\/edu\\.carre-project\\.eu\/api\/",
"handler": "networkFirst"
}]
}
from the cli command : sw-precache --config=sw-precache-config.json
My main problem is that it doesnt cache the api...
I have also tried this regex /(.*)\/api\/(.*)/ and single request such as 'api/config.json' but again with no luck
Is there any obvious mistake in my conf?
The text was updated successfully, but these errors were encountered:
I just gave it a try, and that generates toolbox.router.get(/^https://edu\.carre-project\.eu/api/, toolbox.networkFirst, {});, which is an invalid RegExp.
String escaping in JSON is coming into play here, and you need to actually escape all the '' characters in the string, so that they make it into the final RegExp. (You're only double-escaping some of them.)
Try "urlPattern": "/^https:\\/\\/edu\\.carre-project\\.eu\\/api\\//", which leads to toolbox.router.get(/^https:\/\/edu\.carre-project\.eu\/api\//, toolbox.networkFirst, {}); in the output.
Hello,
Sorry this probably is not a bug but my head is going to explode.
I have this app: https://edu.carre-project.eu/ and a service worker file in https://edu.carre-project.eu/service-worker.js generated by this conf :
The text was updated successfully, but these errors were encountered: