Closed Zabrane closed 3 months ago
You can check the recipes: https://github.com/chimurai/http-proxy-middleware/tree/master/recipes
More specific to your use-case: https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/router.md https://github.com/chimurai/http-proxy-middleware/blob/master/recipes/response-interceptor.md
Describe the feature you'd love to see
Hi @chimurai
I'm new to
http-proxy-middleware
and would like to know if it can help with my problem. Let's assume my browser tries to load this HTML page usingGET
:Is it possible to to intercept it, and instead make it look like this:
Here,
localhost:8080
is where my proxy is running.Similarly, if the above HTML page contains an image (notice the relative URL of the image):
that image must be intercepted and its path rewritten as:
The image has a
relative
URL which needs to be converted to anabsolute
one: . from:/images/profile.png
. to:https://abc.com/images/profile.png
. then finally rewritten as:http://localhost:8080/https://abc.com/images/profile.png
Can
http-proxy-middleware
be of any help here?Thanks
Additional context (optional)
No response