docs: document BUZZ_CORS_ORIGINS and Tauri webview origins in .env.example - #2617
Open
suhaskashyaps wants to merge 1 commit into
Open
docs: document BUZZ_CORS_ORIGINS and Tauri webview origins in .env.example#2617suhaskashyaps wants to merge 1 commit into
suhaskashyaps wants to merge 1 commit into
Conversation
…ample Setting BUZZ_CORS_ORIGINS to only the public origin blocks the desktop app's HTTP API calls (invites, moderation) with a CORS network error, while WebSocket traffic keeps working. The webview origins that must be allowlisted are tauri://localhost (macOS/Linux) and http://tauri.localhost (Windows, per media_proxy.rs and Tauri v2's http default). The relay code documents this in a doc comment (config.rs), but .env.example, the file operators actually copy, had no mention of the variable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the
BUZZ_CORS_ORIGINSrelay setting in.env.example, including the Tauri desktop webview origins that must be allowlisted for the desktop app's HTTP API calls to work.Motivation
Self-hosting Buzz behind a reverse proxy, we set
BUZZ_CORS_ORIGINS=https://<our-domain>and the desktop app's invite minting failed with WebKit's "Load failed", while WebSocket chat kept working. Root cause: the desktop webview's origin (tauri://localhost) was not in the allowlist, so the browser engine blocked the HTTP endpoints (/api/invites, moderation) at preflight.The relay code already notes this in a doc comment (
crates/buzz-relay/src/config.rs), but.env.example, the file operators actually copy, has no mention ofBUZZ_CORS_ORIGINSat all. This fills that gap where operators will actually see it.What changed
.env.example: 7 comment lines in the Relay section documentingBUZZ_CORS_ORIGINS:tauri://localhost(macOS/Linux) andhttp://tauri.localhost(Windows)Verification
Docs-only change; no code paths touched.
OPTIONS /api/invitespreflight withOrigin: tauri://localhostreturned noaccess-control-allow-originuntil the origin was added toBUZZ_CORS_ORIGINS; the desktop invite flow then worked.build_cors_layerincrates/buzz-relay/src/router.rs(permissive when unset; empty non-permissive layer when values fail to parse),crates/buzz-relay/src/config.rs(comma-separated parsing),desktop/src-tauri/src/media_proxy.rs(accepted webview originstauri://localhostandhttp://tauri.localhost).media_proxy.rsand Tauri v2's default (useHttpsSchemeunset =http://tauri.localhost), not live-verified on Windows. It would behttps://tauri.localhostonly ifuseHttpsScheme: truewere set, which this app does not do.Notes
ws://127.0.0.1vsws://localhost). This PR only documents the HTTP CORS requirement.🤖 Generated with Claude Code