Enabling Cross-Origin Requests with CORS Settings

Cross-origin resource sharing (CORS) is a new standard introduced in HTML 5 that allows web applications to use HTTP headers to specify which origins are permitted to request resources on the server. Modern web browsers will consult the Access-Control-Allow-Origin header on how to relax the same origin policy for a given page. By default, this setting was disabled starting version 1.5.0SR1 due to security vulnerability concerns. However, CORS can be enabled for certain or all domains by editing the zoomdata.properties file (located in /etc/zoomdata ).

To modify cross-origin request permissions:

  1. Log out of Zoomdata, if you are still in the program and close the browser.
  2. From your terminal, open a command line session.
  3. Connect to your Zoomdataserver via a command prompt.
  4. Use the following command to access and open the zoomdata.properties file:
    vi /etc/zoomdata/zoomdata.properties
    If the .properties file does not exist, this command creates the file.
  5. Add the following variable into the file on a new line:

Replace <origin1> with your specific URI including http or https as appropriate. Use * as a wildcard instead of a specific origin, thereby allowing any origin to access the resource, keeping in mind that this is a potential security vulnerability and may not work with all browsers. Refer to your Tomcat documentation to verify the appropriate syntax to use.

Save the document using the standard vi commands.

Restart Zoomdata services after making this change and also make sure to clear your browser cache.

For the appropriate Linux command line, refer to the topic Restarting Zoomdata Services.