According to workbox doc, cross domain request should be configured to ensure that regular expression matches the beginning of the URL. However, it doesn't work.
The service worker code is like below.
importScripts('https://storage.googleapis.com/workbox-cdn/releases/3.0.0/workbox-sw.js');
workbox.routing.registerRoute(
/.*\.(png|jpg|jpeg|svg|gif)/,
workbox.strategies.cacheFirst()
);
workbox.routing.registerRoute(
new RegExp('^https://a248.e.akamai.net/.*'),
workbox.strategies.cacheFirst()
);
In the page, responses from same origin resources are cached, but responses from https://a248.e.akami.net
is not.
Anything wrong with my config? or is this a workbox 3.0.0 bug?