3 ms·
ServiceWorkers also don't play nice with CORS in my experience. We often need to bypass them in Angular when making certain requests.
by ourcat 5y ago
ServiceWorkers also don't play nice with CORS in my experience. We often need to bypass them in Angular when making certain requests.
- jaffathecake 5y agoAuthor here! I'm also an editor on the service worker spec, so I'm interested to know where the pain points are.
- ourcat 5y agoHi Jake! (I watch your videos ;)) Many times, the (Angular) ServiceWorker has given us CORS headaches on various requests to our APIs and AWS storage files. The only method we've found, after various AWS configs and ngsw-config.json attempts, was to add `ngsw-bypass=true` to all requests. I'll see if I can find the Github issue, where this has come up before. Incidentally, while you're here, I'm planning on building something which will require use of SharedArrayBuffer. Will adding the (now) required Cross-Origin isolation COOP/COEP headers cause any issues to existing CORS setups? :)
- jaffathecake 5y agoCOOP+COEP won't change how CORS works, but it means you can't have no-cors resources on your page unless they have CORP headers
- ourcat 5y agoVery useful info. Thanks!