Change the default REST endpoint proxy path
Change the default REST endpoint proxy path
By default, the Coveo REST endpoint proxy path for your Coveo for Sitecore instance is set to http://<INSTANCE_HOSTNAME>/coveo/rest
.
You can change this default value to a custom path.
If you use a custom Coveo REST endpoint with a recent version of Coveo for Sitecore, this may cause your analytics calls to fail. This issue has been fixed in the October 23, 2023 release of Coveo for Sitecore. You’ll therefore need to upgrade to this version of Coveo for Sitecore. For all instructions on how to use a custom Coveo REST endpoint and a custom |
To change the REST endpoint proxy URL
-
Open the
Coveo.SearchProvider.Custom.config
file in a text editor. -
In the
configuration/sitecore
element, look for a<sites>
element. If there’s no<sites>
element, add one.<sitecore> <sites> </sites>
-
In the
<sites>
element, add the<site>
element below:<site name="coveorest" virtualFolder="/coveo/rest" physicalFolder="/coveo/rest" enableTracking="false" database="web" domain="extranet" />
You should now have the following configuration structure:
<sitecore> <sites> <site name="coveorest" virtualFolder="/coveo/rest" physicalFolder="/coveo/rest" enableTracking="false" database="web" domain="extranet" /> </sites>
-
In the new
<site>
element, change the values for both thevirtualFolder
andphysicalFolder
attributes. -
Open the
Coveo.SearchProvider.Rest.Custom.config
file in a text editor. -
In the
<restEndpointConfiguration>
element, look for a<restEndpointPath>
element. If there’s no<restEndpointPath>
element, add one as follows:<coveo> <restEndpointConfiguration> <restEndpointPath>/coveo/rest</restEndpointPath>
-
Change the text content of the
<RestEndpointPath>
element to match the path of the rest site specified previously.
Changing the REST endpoint a search page uses
If you’ve changed the location of the rest endpoint, you’ll need to reference the new location everywhere you inserted a Coveo Hive Coveo Search Resources component.
To set the Coveo REST endpoint
value
-
Open your search page in the Sitecore Experience Editor.
-
Select your Coveo Search Resources component.
-
In the floating toolbar, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.
-
Set the value of the
Coveo REST endpoint
field to the new path.
If you’re using a pre-October 23, 2023 version of Coveo for Sitecore, these changes might cause your Coveo analytics calls to fail.
If so, you’ll also need to upgrade to the October 23, 2023 release and then set the Coveo analytics endpoint
value in your search pages.
To set the Coveo analytics endpoint
value on a search page
-
Open the Coveo search page in the Experience Editor.
-
Select the Coveo Search Resources rendering. It’s typically at the bottom of the page.
-
In the floating toolbar, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.
-
Set the
Coveo analytics endpoint
value. The value must be harmonized with the custom Coveo REST endpoint value. For example, the following combination of values in a Coveo Search Resources data source is valid:-
Coveo REST endpoint
:/coveo/customendpoint
-
Coveo analytics endpoint
:/coveo/customendpoint/ua
-
-
Save and publish your changes.