Cannot Access WSI from a Different Domain
Problem
Web applications hosted on a different domain are unable to communicate with WSI due to cross-origin restrictions.
Problem Definition
The issue occurs when a web application hosted on a different domain attempt to communicate with WSI. The request is rejected, and the browser displays an error such as
Access to fetch at 'https://[domain:port]/api/[endpoint]' from origin 'null' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Solution
To resolve cross origin issues, configure the Web Service Interface to allow access from the specific domain and enable credential sharing in the project configuration file located at \GMSProjects\[projectname]\config. For more information see Configuring CORS for Web Service Interface.