CORS policy

Last updated
Was this helpful?
Cross-Origin Resource Sharing (CORS) is an HTTP header-based mechanism that lets a server specify which origins can load its resources. An origin includes a domain, scheme, or port. For more information, see the Mozilla CORS article.
Browser security prevents a web page from making requests to a different domain than the one that served it. This restriction also applies to UbiFunctions and helps prevent malicious sites from reading sensitive data. In some cases, you may want to allow other sites to send cross-origin requests to your UbiFunctions.
To enable a CORS policy for a UbiFunction and allow calls from web browsers or the HTML Canvas widget, follow these steps:
Step 1: In the Ubidots header, go to Devices and select Functions.
Step 2: Open an existing UbiFunction or create a new one.
Step 3: In the UbiFunction settings, enable CORS policy.
Step 4: Click Save.

Last updated
Was this helpful?
Was this helpful?