If you have VertiGIS Studio Search installed on-prem, you may need to configure its Cross-Origin Resource Sharing (CORS) settings to get it to work successfully with Web apps from a different origin. This could apply to you if:
- You have VertiGIS Studio Search installed on-prem, but use SaaS VertiGIS Studio Web.
- You have both VertiGIS Studio Search and VertiGIS Studio Web installed on-prem, but have them on separate servers.
On the server where VertiGIS Studio Search is installed, open the backend configuration .env file in a text editor like Notepad++. Its default location is in C:\Program Files\VertiGIS\VertiGIS Studio Search\search\Engine\bin\search-modules\
- Find the CORS section. By default, it is disabled (commented out).
- Remove the first "#" character from every line in this section that contains "%search-api.quarkus.http.cors" to uncomment it.
- Directly after "%search-api.quarkus.http.cors.origins=", add the origin from which you would like to allow access to Search. For example, https://apps.vertigisstudio.com for SaaS Web apps or https://[server].[domain] for on-prem installations of Web.
- Save the file and close it.
- In the Windows Services application, restart the VertiGIS Studio Search Engine (API) service to reload the configuration.
Once these steps are complete, you should no longer see CORS errors when you attempt to run your searches from your Web apps.