HomePhabricator
Diffusion Comm ecd1e3be96da

[keyserver] Serve web worker files

Description

[keyserver] Serve web worker files

Summary:
Part of ENG-2628

We need to serve web/service worker files from the keyserver because during registration we need to pass a url where it's available. So the web app would call e.g. serviceWorkers.register('http://web.comm.app/workers/notif') to register the notification service worker. Service workers work only in a specific "scope" which depends on the url, but we want the notif service worker to apply everywhere and the simplest way is to just set the Service-Worker-Allowed header.

Depends on D6715

Test Plan: Test that the file is correctly served in dev and prod modes. Test with later diffs if the service worker is correctly registered

Reviewers: atul, tomek, kamil, ashoat

Reviewed By: ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D6716

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Feb 13 2023, 6:58 AM
Reviewer
ashoat
Differential Revision
D6716: [keyserver] Serve web worker files
Parents
rCOMM1077e7310cdc: [web] Add support for web workers to webpack
Branches
Unknown
Tags
Unknown