docs: add CDN-agnostic Asset CDN Setup guide#576
Conversation
91f2600 to
83ecf6c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83ecf6c8f0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
83ecf6c to
bb404e0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb404e071b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
bb404e0 to
f2bd31b
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f2bd31bf50
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
f2bd31b to
7997c8c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7997c8c19d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
7997c8c to
647ed3a
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 647ed3a756
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
647ed3a to
f44fbd1
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f44fbd16de
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
f44fbd1 to
0014713
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 00147135d1
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Companion to chatwoot/chatwoot#14581 (fix #13687). The existing cloudfront-cdn page only covers AWS-specific distribution config and doesn't explain the asset-upload workflow that any CDN deployment needs: - which public/ subdirectories to publish - which files (sw.js, manifest.json) must stay same-origin and why - the docker --build-arg ASSET_CDN_HOST step that bakes the host into Vite chunks at build time - runtime ASSET_CDN_HOST + CORS_ORIGINS - per-provider upload commands (Bunny, S3+CloudFront, rsync) - common troubleshooting (LAN firewall, assets-fetched-twice, widget snippet missing cdnUrl) The new generic page sits alongside cloudfront-cdn in the Performance nav group. The CloudFront guide and the environment-variables CDN blurb now link to it for upload mechanics so the AWS-specific page can stay focused on the distribution wizard.
0014713 to
e09e478
Compare
Companion to chatwoot/chatwoot#14581 (fix #13687).
The existing CloudFront CDN guide only covers AWS-specific distribution setup. Self-hosters who want to use a different CDN (Bunny, Cloudflare R2, custom origin, etc.) currently have to reverse-engineer the upload workflow themselves: which
public/subdirectories matter, which files must stay same-origin, howASSET_CDN_HOSTpropagates at runtime, and what CORS setup the chosen CDN topology requires.This PR adds a CDN-agnostic Asset CDN Setup guide and links to it from the CloudFront CDN guide (for the asset-upload mechanics, since the CloudFront page focuses on the distribution wizard) and the environment-variables mention of
ASSET_CDN_HOST.It also updates
cloudfront-cdn.mdx's CORS troubleshooting section: the old text recommended settingCORS_ORIGINS(which controls API CORS for/api/*, unrelated to asset delivery). Replaced with a correct pull-CDN vs object-storage breakdown that links to the new full CORS section.What it covers
public/belong on the CDN, including root-level favicons/PWA icons andbrowserconfig.xml.sw.js,manifest.json) with the spec citations: Service Worker spec requires same-origin script URL; PWAstart_urlresolves relative to the manifest URL.experimental.renderBuiltUrl+ a server-injectedwindow.__VITE_BASE__script. The same pre-builtchatwoot/chatwoot:latestimage works for anyASSET_CDN_HOSTvalue — flip it in.env, restart, done.ASSET_CDN_HOSTonly; how Rails + Vite + the SDK snippet emitter all read it.config/initializers/cors.rb, no CDN-side CORS config needed./public(CORS must come from the proxy in that case)./packs/js/sdk.js, audio, favicons, brand-assets), hashed Vite chunks need no invalidation.g.src+cdnUrl).