You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue or Feature Request Description:
It would be nice if NavigationRoute's whitelist and blacklist options supported matching on url.pathname + url.search instead of just on url.pathname. Performing server-based redirects based on a query parameter seems somewhat common, and such a redirect breaks if we can't specify that an app shell should not be served for URLs containing that query parameter.
On the page, a user can change languages. The language picker redirects the browser to the current URL but with locale=de appended to the search query. Normally the server would intercept these requests and 302 redirect to de.domain.com. With a service worker installed and the above NavigationRoute registered, this redirect breaks; the user is served the app shell as usual and no redirect occurs.
It makes sense to me that we should be able to do the following:
Library Affected:
workbox-routing
Browser & Platform:
n/a
Issue or Feature Request Description:
It would be nice if
NavigationRoute
'swhitelist
andblacklist
options supported matching onurl.pathname + url.search
instead of just onurl.pathname
. Performing server-based redirects based on a query parameter seems somewhat common, and such a redirect breaks if we can't specify that an app shell should not be served for URLs containing that query parameter.Take the following route that we've implemented:
On the page, a user can change languages. The language picker redirects the browser to the current URL but with
locale=de
appended to the search query. Normally the server would intercept these requests and 302 redirect tode.domain.com
. With a service worker installed and the aboveNavigationRoute
registered, this redirect breaks; the user is served the app shell as usual and no redirect occurs.It makes sense to me that we should be able to do the following:
Thoughts?
The text was updated successfully, but these errors were encountered: