Skip to content

Allow specifying constraints #181

Closed
@dominik-korsa

Description

@dominik-korsa

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();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions