Proxy request to url defined after prefix
L2jLiga opened this issue · 2 comments
Is there any possibility to extract absolute url from request url to use it for proxy request?
For example:
Given service which should proxy request to different servers with request and/or response modification (let it be adding identifier)
When
we receive request like:
/proxy/https://google.com/search?q=fastify-http-proxy
Then
service removes prefix to get link and modify it if necessary (in our case: adding modifier to request url):
https://google.com/search?q=fastify-http-proxy&identifier=blah-blah
Then
service makes request to result url with request parameters (headers) and returns result to user
I'm not sure that's really possible with this module. Maybe using https://github.com/fastify/fastify-reply-from directly: you can specify way more options.
A PR that adds support for some hooks/callbaks in this module to support would be nice as well.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.