Many WordPress chat plugins render wp_create_nonce('wp_rest') into inline HTML during page generation. When a page cache like WP Fastest Cache, Varnish, or Cloudflare serves that HTML for days, visitors eventually send expired nonces and hit HTTP 403 errors.
How BridgeChat AI Solves It
- In
publicwidget mode,BridgeChat_AI_FrontendomitswpNoncefrom cached page HTML entirely. - When the visitor opens the chat panel,
POST /wp-json/bridgechat-ai/v1/sessionissues a random UUID paired with an HMAC-SHA256 signature computed from a site-unique secret stored inbridgechat_ai_secrets. - Every chat, handoff, and polling endpoint sets
Cache-Control: no-store, no-cache, must-revalidate, max-age=0and verifies the session token withhash_equals().
The result: static HTML stays fast at the edge while live chat sessions remain authenticated and isolated per visitor. Learn more in our architecture overview and security documentation.