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
Hi there,
Is there any support for post proxy middleware or response modification? I'm looking to replace urls in the response html and js files.
Thanks! ddhhz
The text was updated successfully, but these errors were encountered:
Hi ddhhz, You can manipulate urls by adding another function using the use directive. ie:
var RedWire = require('redwire'); var redwire = new RedWire({ http: { port: 80 } }); redwire.http('example.com', '127.0.0.1:3000'); manipulate = function(mount, url, req, res, next) { if (req.url.indexOf('/testplace/') === 0) { req.url += 'add this'; url += 'add this'; } return redwire.proxy()(mount, url, req, res, next); }; redwire.http('example.com/api').use(manipulate);
Hope this helps.
Cheers
Sorry, something went wrong.
No branches or pull requests
Hi there,
Is there any support for post proxy middleware or response modification? I'm looking to replace urls in the response html and js files.
Thanks!
ddhhz
The text was updated successfully, but these errors were encountered: