Hacker News new | ask | show | jobs
by meiraleal 1026 days 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/