DNS domain

We are develop a APP, with IONIC5 and CAPACITOR 5, for Android and IOS devices
we have some calls to a DomainXXX, and we need forward those calls to another domain (DomainYYY.com)
Is its possible? Any Ideas?

You can do it server side - a pretty basic redirect.

If trying to do it in Capacitor, why not just update the URLs to the new domain?

we need to do it, at the client, in the celphone :grinning:
we are import JS from a library that we cannot rewrite…

DNS is controlled by the OS so I highly doubt you can override it in an app. That would be a security risk to how the internet works :grin:

You could fork the JS library in question and update to the domain you need.

Otherwise, you could possibly intercept the requests and swap out the domain if it matches - Intercepting JavaScript Fetch API requests and responses - LogRocket Blog

1 Like