Change the default reverse proxy REST endpoint path

By default, the reverse proxy REST endpoint path is set to http://<INSTANCE_HOSTNAME>/coveo/rest. You can change this default value to a custom path.

Important

If you use a custom reverse proxy 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 reverse proxy REST endpoint and a custom Coveo analytics endpoint in a search page, see Changing the reverse proxy REST endpoint an existing search page uses.

To change the reverse proxy REST endpoint path

  1. Open the Coveo.SearchProvider.Custom.config file in a text editor.

  2. In the configuration/sitecore element, look for a <sites> element. If there’s no <sites> element, add one.

    <sitecore>
      <sites>
      </sites>
  3. 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>
  4. In the new <site> element, change the values for both the virtualFolder and physicalFolder attributes.

  5. Open the Coveo.SearchProvider.Rest.Custom.config file in a text editor.

  6. 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>
  7. Change the text content of the <RestEndpointPath> element to match the path that you specified earlier.

Changing the reverse proxy REST endpoint a search page uses

If you’ve changed the location of the reverse proxy 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

  1. Open your search page in the Sitecore Experience Editor.

  2. Select your Coveo Search Resources component.

  3. In the floating toolbar, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.

  4. 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

  1. Open the Coveo search page in the Experience Editor.

  2. Select the Coveo Search Resources rendering. It’s typically at the bottom of the page.

  3. In the floating toolbar, select Edit the rendering’s data source. It should be the leftmost option in the toolbar.

  4. 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

  5. Save and publish your changes.