Open a-laughlin opened 3 years ago
when i initially hacked this together i tried all sorts of proxy stuff first but couldnt get it to work either. I'm currently out of ideas and time ;)
Gotcha. Thanks for considering. Did you have any threads discussing options with the modern-web folks? I'd be curious to see any dialog from what you tried. If you haven't reached out to them yet, I can give it a shot. Getting a proxy for it will solve a number of problems for my team.
Created a PR
Love the plugin! Thanks for your effort on it!
It works seamlessly for many cases. Recently I found a blocking issue attempting to use it with mockserviceworker to intercept tests. The plugin uses a 302 redirect which prevents mockserviceworker from working. Here:
I attempted writing a patch that substitutes a proxy for the redirect, but haven't been able to get it to work. Any thoughts on what I'm missing? Here's the replaced code using
koa-proxies
.Thanks!
Edit: Also tried the proxy as middleware per https://modern-web.dev/guides/dev-server/proxy-to-other-servers/#add-a-proxy-to-your-server-config ... no luck yet.
Adam