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
how to rewrite html body #796
Comments
+1 |
I'm not at all sure what's the best way to do this, but this is a scrip we've used successfully to inject a script into a page.
|
This solution must be modified to avoid the use of end( ... modify ) which uses implicilty the write() method which has been rerouted into collecting the chunks. So you finish having another chunk which is your own. Fix:
...
|
Question, I would like to do the same but for request. That's, before proxyng, I need to put an extra parameter to the body and after proxy the request. How can I do it? |
Maybe this method is right for you
|
This works for me. https://github.com/saskodh/http-proxy-response-rewrite |
how to change the contents of html,when the page is received from proxy?
my aim is to add some html code to the page,when the page returns to client
the code is like followings:
The text was updated successfully, but these errors were encountered: