Enabling Cross-Origin Resource Sharing (CORS)
Cross-Origin Resource Sharing (CORS) allows UI integrations to make API requests from external domains directly from the UI and allows web-based integrations to make requests directly to the Fotoware API from JavaScript code within a website without using the back end.
CORS is disabled by default.
To enable CORS:
- From the Tools menu (cogwheel icon), go to Site Configuration > Integrations > Applications.
- Select Add application.
- In the Cross-Origin Resource Sharing (CORS) section, turn on the Enable CORS toggle.
- Select Add.
- Enter the name of the external site, for example, https://api.fotoware.com.
- Select Save. The changes are not immediate; it takes approximately 10 minutes for the external site to be added to your Fotoware site.
- If you need to delete an external site after saving, select Delete for the relevant site.
Tip: If you specified redirect URIs when registering a UI application before enabling CORS, these URIs are automatically added to CORS when it is enabled.