Skip to content

Add ignorePrefixes options #129

Closed
Closed
@dominik-korsa

Description

@dominik-korsa

🚀 Feature Proposal

Add ignorePrefixes option, which takes an array. All requests made to those routes would not get handled by fastify-http-proxy.

Motivation

I'd like to proxy my Vue.js development server to the root prefix (/). I also want to have /api/ routes on the same server.

Example

await server.register(FastifyHttpProxy, {
  upstream: 'http://localhost:8080',
});
await server.register(registerOAuth, { prefix: '/api/oauth', logLevel: 'info' });
await server.register(registerWebsiteApi, { prefix: '/api/website', logLevel: 'info' });

Disclosure

I'm new to Fastify, so this might already be possible without modifying fastify-http-proxy. If it's the case I'd ask for an example of how to do this (maybe it's a good idea to place it in README.md). Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions