2 ms·
> If you want to intercept and modify a incoming json response for some specific url pattern, would a service worker be a good way to do so? Yes but in this ca
by meiraleal 3y ago
> If you want to intercept and modify a incoming json response for some specific url pattern, would a service worker be a good way to do so?
Yes but in this case you would need to setup a reverse proxy so your service worker and the intercepted page runs in the same domain. You could use cors-anywhere[1] for that.
[1] https://cors-anywhere.herokuapp.com/ https://cors-anywhere.herokuapp.com/