docs: include widget notification audio in restricted-instance asset guidance

Open Beginner friendly
#581 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Active
Domain
documentation

Research direction

Open the restricted-instance guide and read the widget-assets section referenced in the issue. Update the four-path wording to include /audio/widget/ding.mp3, explain that it must be reachable without an authentication redirect with audio content type and CORS headers preserved, and distinguish login redirects from browser autoplay restrictions. Done means the guidance covers the exact-file exception and troubleshooting case without suggesting broader asset exposure.

Written by the indexing model from the issue text.

Description

The restricted-instance guide lists four widget asset paths but omits the notification sound, /audio/widget/ding.mp3.

With Chatwoot v4.17.0 behind an authentication gateway, the widget loaded normally but Firefox could not download its sound. The gateway returned a 302 login redirect instead of the MP3, producing a CORS error. Being signed in to the embedding application did not solve this.

The audio helper uses fetch(new Request(resourceUrl)), whose default credentials mode does not send cross-origin gateway cookies. The CORS initializer already permits /audio/* GET/OPTIONS from any origin.

Suggested documentation improvement:

  • Include the default widget sound /audio/widget/ding.mp3 in the asset guidance and update the four-path wording.
  • Explain that this static sound must be reachable without an authentication redirect, with its audio content type and CORS response headers preserved. An exact-file exception is sufficient for the default widget tone; exposing arbitrary audio or help-content paths is unnecessary.
  • Add a troubleshooting distinction: a sound request redirected to login is a gateway/network failure; browser autoplay restrictions can still apply after a successful download.

Verified on our deployment after adding that exact-file exception: a cookie-free cross-origin request returned 200 audio/mpeg, Access-Control-Allow-Origin: *, 2,667 bytes, with no redirect. Firefox successfully decoded it through AudioContext.decodeAudioData. Neighboring audio paths and protected help content continued to require authentication. No Chatwoot code change or additional origin CORS configuration was needed.

Dominant language
MDX
Stars
89
Forks
178
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from chatwoot/docs

All issues in chatwoot/docs

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.