Configure Cross Origin Resource Sharing (CORS)

By default, CityworksTrimble Unity Work Management is configured to prevent cross-origin resource sharing. Since Trimble Unity runs in a different domain (the URL in the browser location bar), the Trimble Unity site name needs to be added to the allowed CORS sites in Cityworks. Every Trimble Unity site that you use with Cityworks needs to be added, alternatively you may decide to allow all sites. The default sites for Trimble Unity are https://app.trimbleunity.com and https://www.trimbleunity.com but others may be required for regional, dedicated, or preview release sites.

IMPORTANT: If your GIS site is protected by a Web Application Firewall or similar, be sure to whitelist the Trimble Unity cloud hosting environment as well as the Trimble Unity NAT gateway IP address. Contact customer support to obtain this IP address.

  1. In Admin on the Admin tab, click CORS Whitelist.
  2. Enter the URL you want to whitelist in the Whitelist Url field.
  3. Click Add Record.

  1. Use the following test utility to check that your Cityworks and ArcGIS sites are configured correctly for Cross Origin Resource Sharing.

https://app.trimbleunity.com/techcenter/testcors.html

The following image is an example of testing ArcGIS Enterprise (in many cases this path will be /portal instead of /arcgis).

The following image shows an example of testing Cityworks server. The recommended format to test is https://<server>/<site>/gis/0/0/rest/services/qe/FeatureServer.