Allow specifying constraints
dominik-korsa opened this issue ยท 2 comments
dominik-korsa commented
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
๐ Feature Proposal
Allow specifying custom constraints on routes matched by the proxy
https://github.com/fastify/fastify-http-proxy/blob/master/index.js#L176-L182
Motivation
This would be a potential solution for the problem described in #129
Example
import FastifyHttpProxy from 'fastify-http-proxy';
import Fastify from 'fastify';
const fastify = Fastify();
fastify.register(FastifyHttpProxy, {
upstream: `http://localhost:3000`,
constraints: { version: '1.2.0' },
});
fastify.listen();
mcollina commented
Would you like to send a Pull Request to address this issue? Remember to add unit tests.
dominik-korsa commented
I'm trying to do that right now