Enable Cross-Domain Requests

About Cross Domain Communication for SmartHub

In case you are calling the SmartHub APIs from a different domain via JavaScript code, web browsers block the requests unless you enable Cross Domain communication for SmartHub. You must specify the domains that are allowed to call the SmartHub API in the SmartHub Security Settings.

Valid options:

  • Specific domains such as https://domain1.com
  • Wild-card (*) that permits all the domains

Configure SmartHub for Cross-Domain Requests

First, navigate to the web.config file and open it.

  1. In the SmartHub administration portal, navigate to the Security Settings page.
  2. In the Trusted App Redirect URLs field, enter the domain that you want to allow for cross-domain requests.
  3. You can add multiple domains to this field by entering each domain on a new line.