feat: pwa registration#762
Conversation
|
✔️ Deploy Preview for wargabantuwarga ready! 🔨 Explore the source changes: bcd4831 🔍 Inspect the deploy log: https://app.netlify.com/sites/wargabantuwarga/deploys/6126495b95dcf800086ef499 😎 Browse the preview: https://deploy-preview-762--wargabantuwarga.netlify.app |
Codecov Report
@@ Coverage Diff @@
## main #762 +/- ##
=======================================
Coverage 84.82% 84.82%
=======================================
Files 132 132
Lines 1417 1417
Branches 455 455
=======================================
Hits 1202 1202
Misses 211 211
Partials 4 4 Continue to review full report at Codecov.
|
|
Need help from @zainfathoni and others also to test the preview domain. |
|
I just checked https://deploy-preview-762--wargabantuwarga.netlify.app/ and got mixed result. EDIT: Images were successfully cached as intended. LGTM. This previous error was because i initially opened the page on large screen and the screen was reesized when opening devtools. The first two cached images were the large ones.
Also TIL the whole Content-Security stuff 🤯
Link drop: |
zainfathoni
left a comment
There was a problem hiding this comment.
LGTM 💯
Thanks for working on it, Mas @svspicious! 🙏
|
@all-contributors please add @svspicious for code |
|
I've put up a pull request to add @svspicious! 🎉 |

Closes #637
Related to #716 #719
Description
I am new with CSP stuff, but I think this might be a clue https://qubyte.codes/blog/content-security-policy-and-service-workers.
TLDR; SW is not using
image-srcpolicy but usingconnect-srcpolicy instead. Since we don't haveconnect-srcit fallback todefault-srcwich is only limited toself/ origin of the domain itself. So, it refuses to "connect"Mas @zainfathoni tried to add Cloudinary url to
script-src(at #719 ) but ofc it doesn't work, we need to add toconnect-src.So I tried to add res.cloudinary.com to
connect-srcand deploy to my personal netlify account for preview (yes, I'm dumb. brb making a Draft PR for deploy preview). And it works (and it caches cloudinary img assets)https://hardcore-noyce-3b9626.netlify.app/
Current Tasks