We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Switched to Vite which uses this library under the hood. Any way to switch the target based on request headers like the below library,
chimurai/http-proxy-middleware#273
The text was updated successfully, but these errors were encountered:
same question. no idea on how to change the path for proxy, after reading the README.
Sorry, something went wrong.
@enchorb @Yrobot I think your question is for Vite, not this library
The first section of this library's README implicitly shows how you can do that if you're using the library directly
var proxy = httpProxy.createProxyServer(options); http.createServer(function(req, res) { var target = req.headers.whatever === 'bar' ? 'http://mytarget1.com:8080' : 'http://mytarget2.com:8080' proxy.web(req, res, { target: target }); });
No branches or pull requests
Switched to Vite which uses this library under the hood. Any way to switch the target based on request headers like the below library,
chimurai/http-proxy-middleware#273
The text was updated successfully, but these errors were encountered: