Skip to content

Forward requests without mocks to a different "fallback" server #51

@OliverJAsh

Description

@OliverJAsh

We are considering migrating from MockServer to mockttp and one of the requirements we have is to forward requests without mocks to a different "fallback" server.

When the mock server receives a request, if there is no mock defined for this request, we would like to forward the request on to another server.

In MockServer this is possible using the following CLI flags:

        -proxyRemotePort <port>                 Optionally enables port forwarding mode.
                                                When specified all requests received will
                                                be forwarded to the specified port, unless
                                                they match an expectation.

        -proxyRemoteHost <hostname>             Specified the host to forward all proxy
                                                requests to when port forwarding mode has
                                                been enabled using the proxyRemotePort
                                                option.  This setting is ignored unless
                                                proxyRemotePort has been specified. If no
                                                value is provided for proxyRemoteHost when
                                                proxyRemotePort has been specified,
                                                proxyRemoteHost will default to "localhost".

Is this possible with mockttp, or is it something you would consider adding?

I read some stuff about proxies in the mockttp docs but as far as I can tell this is a different type of proxy.

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