angular/packages/service-worker/worker
George Kalpakas e1bb638e0b fix(service-worker): include headers in requests for assets (#47260)
Previously, when requesting non-cached asset resources from the network,
the ServiceWorker would strip off all request metadata (including
headers). This was done in order to avoid issues with opaque responses,
but it turned out to be overly aggressive, breaking/worsening legit
usecases (such as requesting compressed data).

This commit fixes this by preserving the headers of such requests.

For reference, Workbox passes the original request as is. (See for
example the [NetworkFirst][1] strategy).

> **Note**
> Data requests (i.e. requests for URLs that belong to a data-group) are
  not affected by this. They already use the original resource as is.

[1]: 95f97a207f/packages/workbox-strategies/src/NetworkFirst.ts (L90)

Fixes #24227

PR Close #47260
2022-09-06 10:03:12 -07:00
..
src fix(service-worker): include headers in requests for assets (#47260) 2022-09-06 10:03:12 -07:00
test fix(service-worker): include headers in requests for assets (#47260) 2022-09-06 10:03:12 -07:00
testing fix(service-worker): include headers in requests for assets (#47260) 2022-09-06 10:03:12 -07:00
BUILD.bazel build: switch all instances from ng_rollup_bundle to app_bundle (#44490) 2022-01-04 12:14:14 -08:00
main.ts refactor(service-worker): simplify accessing CacheStorage throughout the ServiceWorker (#42622) 2021-06-24 09:55:32 -07:00