iachat/app/javascript/dashboard/routes/dashboard
Muhsin Keloth a4c3d3d8c0
feat(widget): Allow widget loading in mobile app WebViews when domain restrictions are set (#13763)
When `allowed_domains` is configured on a web widget inbox, the server
responds with Content-Security-Policy: frame-ancestors <domains>, which
blocks the widget iframe in mobile app WebViews. This happens because
WebViews load content from file:// or null origins, which cannot match
any domain in the frame-ancestors directive.

This adds a per-inbox toggle — "Enable widget in mobile apps" — that
skips the frame-ancestors header when the request has no valid Origin
(i.e., it comes from a mobile WebView). Web browsers with a real origin
still get domain restrictions enforced as usual.

<img width="2330" height="1490" alt="CleanShot 2026-03-11 at 10 13
01@2x"
src="https://github.com/user-attachments/assets/d9326fac-020d-4ce7-9ced-0c185468c8fc"
/>


Fixes
https://linear.app/chatwoot/issue/CW-6560/widget-is-not-loading-from-iosandroid-widgets

How to test

1. Go to Settings → Inboxes → (Web Widget) → Configuration
2. Set allowed_domains to a specific domain (e.g., *.example.com)
3. Try loading the widget in a mobile app WebView — it should be blocked
4. Enable "Enable widget in mobile apps" checkbox
5. Reload the widget in the WebView — it should now load successfully
6. Verify the widget on a website not in the allowed domains list is
still blocked

---------

Co-authored-by: iamsivin <iamsivin@gmail.com>
2026-03-17 14:29:41 +04:00
..
campaigns feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
captain fix: scenario label (#13746) 2026-03-10 18:32:44 +05:30
commands feat: Add natural language date parser for snooze functionality (#13587) 2026-03-06 12:20:22 +04:00
companies feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
contacts fix: search header overlap with new conversation form (#13548) 2026-02-20 11:24:37 +05:30
conversation fix(contacts): Show telegram id in contact details form (#13611) 2026-02-23 19:26:45 +04:00
customviews chore: Update buttons in dashboard (#11145) 2025-03-31 17:21:32 -07:00
helpcenter feat: Add draft status for help center locales (#13768) 2026-03-17 12:45:54 +04:00
inbox feat: Add natural language date parser for snooze functionality (#13587) 2026-03-06 12:20:22 +04:00
noAccounts fix: Handle login when there are no accounts (#12816) 2025-11-07 10:14:59 +05:30
notifications feat(V5): Update settings pages UI (#13396) 2026-02-19 15:04:40 +05:30
settings feat(widget): Allow widget loading in mobile app WebViews when domain restrictions are set (#13763) 2026-03-17 14:29:41 +04:00
suspended chore: Remove older UI (#11720) 2025-07-01 09:43:44 +05:30
upgrade fix: Conditionally fetch limits and assistants for enterprise/cloud (#12099) 2025-08-04 15:06:58 -07:00
dashboard.routes.js feat: Companies page (#12842) 2025-11-18 15:29:15 +05:30
Dashboard.vue chore: Update theme colors and add new Inter variable fonts (#13347) 2026-01-28 14:36:04 -08:00