Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy URL Rewriting #445

Closed
mdmoreau opened this issue May 28, 2020 · 1 comment
Closed

Proxy URL Rewriting #445

mdmoreau opened this issue May 28, 2020 · 1 comment

Comments

@mdmoreau
Copy link

Is it possible to rewrite links on a page in a similar way to how Browsersync does it?

Example:
PHP server: site.localhost
webpack-dev-server: site.localhost:8080 (proxy site.localhost)

Right now when I load up site.localhost:8080, it displays absolute links on a page as site.localhost/link.html. Browsersync somehow automatically rewrites all those to site.localhost:8080/link.html so navigating pages keeps you running through webpack dev server.

Is something like that possible using this middleware? Tried a few things with onProxyRes, but I'm not sure if that can support what I'm looking for. Thanks!

@mdmoreau
Copy link
Author

Was able to find a solution at #97 (comment) for anyone interested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant