workbox icon indicating copy to clipboard operation
workbox copied to clipboard

How to send headers for precached entries ?

Open AnilSonix opened this issue 2 years ago • 0 comments

Library Affected: NA

Browser & Platform: NA

Issue or Feature Request Description: I have a React PWA app (created with CRA). I can't turn it into true PWA because some routes require COEP headers. To solve this I have excluded /index.html from the precache and send the COEP headers from Netlify on the correct route. It uses client-side rendering.

I want /index.html to be in preache (for offline behavior), but I want to send COEP headers conditionally from the service worker. How can I implement this?

TLDR I need to send response headers for preached responses conditionally.

AnilSonix avatar Oct 06 '23 16:10 AnilSonix