NOTE: This does not apply if you are wanting to use the out-of-the-box integration between VertiGIS Studio Web and VertiGIS Studio Search. To use the Web/Search integration, please either install both Web and Search on the same server or use SaaS only.
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.
Configuration Steps:
-
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.
Comments
0 comments
Article is closed for comments.