You can use Mockfly as a mock API server for your application, but you might also want it to act as aproxy for your real API. This is useful during development when you have some endpoints already implemented in a real API and others that are not yet available. This way, you can continue pointing your app to Mockfly and decide which endpoints should go through to the real API and which ones should not. This makes development easier, and you don’t have to worry about managing multiple environment variables while developing (we do not recommend using this approach in production). You can configure this from the project settings modal, which you can access from the project list or from within the project itself in the sidebar menu.
Before explaining how to use Mockfly as a proxy, it is important to understand the different configurations available in Mockfly. There are two levels of configuration: project-level and endpoint-level. At the project level, you can enable or disable the proxy and specify the URL of the real API that Mockfly will use. Then, at the endpoint level, there are three possible settings you will find in the “Config” tab: