2156beed0c
The Angular ServiceWorker can serve requests to a special virtual path, `ngsw/state`, showing [information about its internal state][1], which can be useful for debugging. Previously, this would only work if the ServiceWorker's [scope][2] was the root directory (`/`). Otherwise, (e.g. when building the app with `--baseHref=/some/path/`), the ServiceWorker would fail to detect a request to `/some/path/ngsw/state` as matching `ngsw/state` and would not serve it with the debugging information. This commit fixes it by ensuring that the ServiceWorker's scope is taken into account when detecting a request to `ngsw/state`. [1]: https://angular.io/guide/service-worker-devops#locating-and-analyzing-debugging-information [2]: https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerRegistration/scope Fixes #30505 PR Close #37922 |
||
---|---|---|
.. | ||
cli | ||
config | ||
src | ||
test | ||
testing | ||
worker | ||
BUILD.bazel | ||
PACKAGE.md | ||
index.ts | ||
package.json | ||
public_api.ts | ||
safety-worker.js |