Intermittent 419 errors on Coveo Hive search interfaces

In this article

Symptoms

Search interface page users get "419 expired token" errors intermittently.

Cause

You may be caching the /coveo/rest reverse proxy endpoint. Since the October 30, 2020 release, Coveo Hive search interfaces perform front-end calls through the reverse proxy endpoint to generate search tokens. Storing search token call responses in an HTTP cache eventually leads to the retrieval of a Coveo search token that has expired.

Resolution

The issue was resolved in the Coveo for Sitecore August 15, 2022 release (5.0.1153.1). We recommend you upgrade to the latest version of Coveo for Sitecore.

Workaround

Disable the /coveo/rest reverse proxy endpoint response caching mechanisms, whether using Cloudflare or another service.