Proxy mode

 Partially mock APIs using the proxy mode

Mockoon supports partial mocking of an API endpoints by forwarding the requests that does not match a declared route to the URL of your choice.

To activate the proxy mode, open the Environment Proxy options by clicking on the tab at the top of the window:

click on proxy tab

Enable the proxy mode by checking the box and enter the server URL to which you want to forward the calls. A small shield icon should appear on the right of your environment name indicating that the proxy mode has been enabled:

tick the Proxy checkbox

From now on, all routes that have been defined in Mockoon will be intercepted, and any other request not matching any route path will be forwarded to the server URL you entered in the proxy mode setting.

 Disable API prefix forwarding

By default, the API prefix will be part of the path called on the proxied API. You can disable this behavior by ticking the "Remove prefix" checkbox:

tick the Proxy no prefix forward checkbox

 Proxy headers

Proxy specific headers can also be added, both to the forwarded request and the response received from the target API.

add proxy headers by filling the keys and values