fastify-http-proxy
fastify-http-proxy copied to clipboard
can register proxy by host
Prerequisites
- [X] I have written a descriptive issue title
- [X] I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
can register proxy by host name
Motivation
No response
Example
server.register(proxy, {
upstream: 'http://single-signon.example.com',
host: 'xxx.sample.com', // optional
http2: false // optional
})
This would be a good feature to add!
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
Check out https://www.fastify.io/docs/latest/Routes/#constraints, it's likely just about passing this to the routes.
I think it is already implemented in https://github.com/fastify/fastify-http-proxy/pull/182 https://github.com/fastify/fastify-http-proxy/blob/04e49eb25e29eb6254b0cc22aa8058163a2328cc/index.js#L174
The follow-up update should be documentation only