Proxy API in development

In our mendix app, we have some custom widgets and javascript actions which make Fetch requests to an API. In production, we proxy both the mendix app and the api behind an nginx server, however I am hitting a problem in development as the mendix modeler is serving from a different address (port).  Is it possible to setup the modeler to proxy unknown requests to my API?   
1 answers

Assuming you want to do a different call (with/without a different proxy) to a different API you simply can think to a mechanism like;


1 – capture the requests to be able to categorize them (like by looking to its HttpRequest/HttpHeaders, or build a custom mechanism with a local constant/variable override or so to defina a (un)known request if you just want to capture it in development in modeller)

2 - do a specific follow-up action REST call to the desired API (with a specific proxy config) based on the (un)known state

Mind you that there is a Native proxy configuration available on the Call REST activity, which you can use also by configuring in a dynamic fashion (if $EnvironmentDev then $ProxySettingsDev else if $EnvironmentPro then $ProxySettingsPro..)