Hiding JS call variables in custom code

Hello,

I have written an API call in my custom code and it is working fine, the code looks something like this:

function myFunction() {
	fetch(`https://my-api.com/my-endpoint`).then(doSomething());
}

How can I hide the URL as a variable coming from Webflow’s backend so my API url will not be exposed on the client side?

Thanks!

3 Likes