Skip to content

docs: complete the list of paths required for ChatWidget behind auth gateways#570

Open
rf-leon wants to merge 3 commits intochatwoot:mainfrom
rf-leon:docs/add-widget-iframe-path
Open

docs: complete the list of paths required for ChatWidget behind auth gateways#570
rf-leon wants to merge 3 commits intochatwoot:mainfrom
rf-leon:docs/add-widget-iframe-path

Conversation

@rf-leon
Copy link
Copy Markdown

@rf-leon rf-leon commented May 4, 2026

Summary

The Enabling ChatWidget for Users section in restricted-instances.mdx is incomplete. Today it lists three paths (/cable, /api/v1/widget/*, /packs), but a self-hoster following the guide and putting Chatwoot behind any auth gateway (Cloudflare Access, basic auth, ZTNA, internal reverse proxy) hits at least four additional issues before the widget actually works end to end. This PR adds them all.

Missing paths this PR documents

Path What it serves Symptom when blocked
/widget The iframe HTML the SDK loads to render the chat UI SDK script loads but no chat bubble appears
/vite/assets JS / CSS bundles for the iframe (newer Chatwoot uses Vite, not Webpack — /packs alone is no longer enough) Iframe HTML loads but renders blank
/brand-assets Installation logo shown in the widget footer Broken image in the footer
/rails/active_storage Visitor uploads + agent-sent attachments Visitors can't see images the agent sends; agents can't see visitor uploads

Reference

The Chatwoot SDK builds the iframe URL as ${baseUrl}/widget?website_token=${websiteToken} in IFrameHelper.js. The iframe HTML at /widget then references its bundles from /vite/assets/..., the footer logo from /brand-assets/logo_thumbnail.svg, and visitor/agent attachments through /rails/active_storage/....

Changes

  1. Adds a Widget Page subsection documenting /widget as a required public path.
  2. Restructures the Widget Assets subsection to list all four asset categories (/packs, /vite/assets, /brand-assets, /rails/active_storage) with a one-line description of each.

Context

I hit each of these failures in sequence while migrating a production app from Crisp to self-hosted Chatwoot behind Cloudflare Access. Followed the existing three-path guidance, widget didn't load — found /widget in the SDK source. Bypassed it, widget rendered blank — found /vite/assets/* in the iframe HTML. Tested an agent-sent image, visitors saw broken attachments — found /rails/active_storage/*. Eventually noticed the broken logo in the footer — found /brand-assets/*.

Documenting them all so the next person can configure every bypass in one pass instead of debugging four distinct symptom reports from users.

rf-leon added 2 commits May 4, 2026 15:15
…ents

The widget SDK injects an iframe pointing to /widget?website_token=...
This path must be publicly reachable for the chat bubble to render, but
was missing from the list of required paths in the restricted-instances
guide. Self-hosters who put Chatwoot behind any auth gate (Cloudflare
Access, basic auth, ZTNA) will see the SDK script load but no chat
bubble appear without this bypass.
Newer Chatwoot versions migrated the widget UI from Webpack to Vite. The
JS and CSS bundles inside the iframe are now served from /vite/assets
rather than /packs. Without bypassing this path, the iframe page (/widget)
loads but its bundles fail, producing a blank widget.

Updates the Widget Assets section to document both /packs (SDK loader)
and /vite/assets (iframe bundles), with a note about the migration so
operators of older deployments understand both paths matter.
@rf-leon rf-leon changed the title docs: add /widget iframe path to restricted-instances widget requirements docs: document /widget and /vite/assets paths required for ChatWidget behind auth May 4, 2026
Two more paths the widget pulls from that aren't currently documented:

- /brand-assets serves the installation logo shown in the widget footer.
- /rails/active_storage serves image and file attachments — both visitor
  uploads and media the agent sends back. Without this bypassed, agent-
  sent images display as broken on the visitor side because their HTTP
  GETs are intercepted by the auth gateway.

Restructures the Widget Assets section to list all four paths the widget
loads from, with a one-line description of what each serves, so the next
operator behind an auth gateway can configure all bypasses in one pass
rather than discovering them sequentially through user reports.
@rf-leon rf-leon changed the title docs: document /widget and /vite/assets paths required for ChatWidget behind auth docs: complete the list of paths required for ChatWidget behind auth gateways May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant