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
Right now the goog.routing.ExpessRoute just looks at .pathname of the request URL, and compares it to the path used to the configure the route.
This means that a request for https://cross-domain.com/path/to/file would match a route that was configured with new ExpressRoute({path: '/path/to/file', hander}), even if the service worker were served from https://example.com.
I think the decision was made not to support that additional origin configuration option that sw-toolbox supported, and which was pretty confusing. (@gauntface@addyosmani, can you confirm that's what we decided?)
I'll point out in the docs that ExpressRoute should only be used for same-origin routing, and if cross-origin routes are needed, something like RegExpRoute is a better choice.
The text was updated successfully, but these errors were encountered:
Right now the
goog.routing.ExpessRoute
just looks at.pathname
of the request URL, and compares it to the path used to the configure the route.This means that a request for
https://cross-domain.com/path/to/file
would match a route that was configured withnew ExpressRoute({path: '/path/to/file', hander})
, even if the service worker were served fromhttps://example.com
.I think the decision was made not to support that additional
origin
configuration option thatsw-toolbox
supported, and which was pretty confusing. (@gauntface @addyosmani, can you confirm that's what we decided?)I'll point out in the docs that
ExpressRoute
should only be used for same-origin routing, and if cross-origin routes are needed, something likeRegExpRoute
is a better choice.The text was updated successfully, but these errors were encountered: