Backendless Support

Cross - domain access control for a browser-based app

Backendless Service Platform is not just a mobile backend (mBaaS) - it also provides hosting and runtime support for browser-based applications. 

Indeed, Backendless offers a fully-featured SDK for JavaScript apps. Unless a user hosts his/her Backendless-powered app in the Backendless Hosting system, he/she will be running into cross-origin domain requests. This occurs when an application is loaded into a browser from one host, but then it makes a request (XHR, socket, etc) to another host. In the case of Backendless, the second host would be the backend platform we provide.

To simplify the cross-origin setup, Backendless Console includes a special section where application developer can list all the host names where the app may be loaded from. You can access that section on the Manage > App Settings screen and then scroll down to the Domain Control section: 

The text field in the interface accepts the names of the hosts (domains) where a developer's JS app is loaded by a browser from. Enter the domain names or IP addresses (one per line) or use the * for all domains. Click Save to save the changes.

Is article helpful?