GoogleChrome / workbox

📦 Workbox: JavaScript libraries for Progressive Web Apps

Home Page:https://developers.google.com/web/tools/workbox/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to send headers for precached entries ?

AnilSonix opened this issue · 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.

Hi there,

Workbox is moving to a new engineering team within Google. As part of this move, we're declaring a partial bug bankruptcy to allow the new team to start fresh. We realize this isn't optimal, but realistically, this is the only way we see it working. For transparency, here're the criteria we applied:

Thanks, and we hope for your understanding!
The Workbox team