Skip to Content
0
Aug 08, 2023 at 04:05 PM

Is it possible to check in source if an application is running in CF?

94 Views

If my application is hosted on CF i have to prefix a "." to the service URL to make it work (e.g. url: "." + this.getMetadata().getConfig().serviceUrl). But if it is deployed to ABAP, I have to remove the prefix or else the application will fail to load $metadata.

How can I check in the javascript source of the application, if it is running on CF and the prefix is required?

Is there maybe another way to solve this problem without prefixing a "."?