Skip to content

Impossible to ignore proxy path prefix #887

@maks-rafalko

Description

@maks-rafalko

Hi,

I need to proxy requests from /api to the root of other site: http://test.com:

/api/users -> http://test.com/users
/api/users/1 -> http://test.com/users/1

But all my requests lead to http://test.com/api/*
How to ignore /api prefix but not to ignore other path?
When I use ignorePath settings all my requests lead to http://test.com.

Config:

server.middleware = proxyMiddleware('/api', {target: 'http://test.com', proxyHost: 'test.com'});

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