Configuring CORS Policy for Web Service Interface

To enable cross-origin communication with WSI, update the project configuration file as follows:

  1. Open the project configuration file located at: \GMSProjects\[projectname]\config in an editor for example, Notepad.
  2. In the Web_Service_Interface section, perform the following to enable CORS policy for the specified domains:
    - To allow specific domain, add the trusted domain to the WhiteListDomain property. For example, set the WhiteListDomain property to https://www.google.com to enable the cross-origin communication from this domain to WSI.
    - To add more than one domain, use a semicolon as a separator between the domains. For example, https://www.google.com; www.abc.com.
  3. In the Web_Service_Interface section, perform the following to enable credential sharing:
    - Set the SupportsCredentials property to True.
  4. The cross-origin communication and credential sharing are enabled for WSI.