From 5fc77c90cb06970aa8a7a1ea829f81fff9628ff8 Mon Sep 17 00:00:00 2001 From: Pete Bacon Darwin Date: Thu, 8 Feb 2018 09:08:03 +0000 Subject: [PATCH] fix(aio): do not rewrite /styleguide URL in Service Worker (#22085) This URL needs to be redirected via the server, so we must exclude it from being rewitten. Closes #22078 PR Close #22085 --- aio/ngsw-manifest.json | 2 +- aio/tests/deployment/URLS_TO_REDIRECT.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/aio/ngsw-manifest.json b/aio/ngsw-manifest.json index 81971373b3..35584cc067 100644 --- a/aio/ngsw-manifest.json +++ b/aio/ngsw-manifest.json @@ -19,7 +19,7 @@ "routing": { "index": "/index.html", "routes": { - "^(?!/docs/.|(?:/guide/(?:cli-quickstart|metadata|ngmodule|service-worker-(?:getstart|comm|configref)|learning-angular)|/news)(?:\\.html|/)?$|/testing|/api/(?:.+/[^/]+-|platform-browser/AnimationDriver|testing|api/|(?:common/(?:NgModel|Control|MaxLengthValidator))|(?:[^/]+/)?(?:NgFor(?:$|-)|AnimationStateDeclarationMetadata|CORE_DIRECTIVES|PLATFORM_PIPES|DirectiveMetadata|HTTP_PROVIDERS))|.*/stackblitz(?:\\.html)?$|.*\\.[^\/.]+$)": { + "^(?!/styleguide|/docs/.|(?:/guide/(?:cli-quickstart|metadata|ngmodule|service-worker-(?:getstart|comm|configref)|learning-angular)|/news)(?:\\.html|/)?$|/testing|/api/(?:.+/[^/]+-|platform-browser/AnimationDriver|testing|api/|(?:common/(?:NgModel|Control|MaxLengthValidator))|(?:[^/]+/)?(?:NgFor(?:$|-)|AnimationStateDeclarationMetadata|CORE_DIRECTIVES|PLATFORM_PIPES|DirectiveMetadata|HTTP_PROVIDERS))|.*/stackblitz(?:\\.html)?$|.*\\.[^\/.]+$)": { "match": "regex" } } diff --git a/aio/tests/deployment/URLS_TO_REDIRECT.txt b/aio/tests/deployment/URLS_TO_REDIRECT.txt index b8df3bd6c0..cdc6575d20 100644 --- a/aio/tests/deployment/URLS_TO_REDIRECT.txt +++ b/aio/tests/deployment/URLS_TO_REDIRECT.txt @@ -150,6 +150,7 @@ /docs/js/latest/guide/ngmodule /guide/ngmodules /docs/js/latest/resources /resources /docs/latest/tutorial /tutorial +/styleguide /guide/styleguide /docs/styleguide /guide/styleguide /docs/styleguide.html /guide/styleguide /docs/ts/latest/api/core/HostBinding-var.html /api/core/HostBinding