Test vs Production - dynamic URL's

Options
Hi Xano Team

I am aware of the Data Source configuration to switch between test and production by adding a header X-Data-Source: test for API calls.

On my front end I am also running two separate environments and therefore require to send dynamic links (one for test and one for prod) for features like magiclink depending if you are using the test environment of production.

So in essence when you are in the test environment the maglink url will be different than the production environment.

Can you please confirm what would be the best option in Xano to achieve this? My thinking is to extract header information on an api level to see if the the header contains a X-Data-Source: test, and then send a different url?

It would be nice to have this taken care of behind the scenes in Xano and we only have to create a new system variable that distinct between test and production.

Please advice if my thinking is correct or would you suggest another solution

Comments