fix(deploy): add Tauri webview origins to the compose BUZZ_CORS_ORIGINS default#2888
Open
nscheifler wants to merge 1 commit into
Open
fix(deploy): add Tauri webview origins to the compose BUZZ_CORS_ORIGINS default#2888nscheifler wants to merge 1 commit into
nscheifler wants to merge 1 commit into
Conversation
…NS default A relay deployed from deploy/compose blocks the desktop app at CORS preflight: the template allowlists only the public domain, but the desktop webview runs from tauri://localhost (macOS/Linux) or http://tauri.localhost (Windows). "Join an existing community" then fails with WebKit's generic "Load failed" while curl/NIP-11 succeed. Ship the webview origins in the template default, tell operators to keep them, and document the requirement in deploy/compose/README.md. Fixes block#2872
nscheifler
force-pushed
the
fix/compose-cors-tauri-origins
branch
from
July 25, 2026 20:12
d799620 to
631a846
Compare
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
The compose template
deploy/compose/.env.examplesetsBUZZ_CORS_ORIGINSto one public domain. The webview of the desktop app has a different origin. The origin istauri://localhoston macOS and Linux. The origin ishttp://tauri.localhoston Windows.The relay reads
BUZZ_CORS_ORIGINSas a comma-separated list of exact origins (crates/buzz-relay/src/config.rs;build_cors_layerincrates/buzz-relay/src/router.rs). When the variable is set, the relay does not permit other origins. This design is correct, but the template value does not include the webview origins. Thus the desktop app cannot use the HTTP API of a relay that an operator deploys from the template.The first failure that the user sees is in the "Join an existing community" flow. The flow stops and shows the error
Load failed. At the same time, the relay replies correctly to a NIP-11 request fromcurl. Thus the relay seems healthy, and the CORS cause is hard to find.This change:
BUZZ_CORS_ORIGINSindeploy/compose/.env.example.deploy/compose/README.md.Related issue
Fixes #2872.
The closest existing PRs (not duplicates):
BUZZ_CORS_ORIGINSto the root.env.example. It does not change the value in the compose template. The two changes are compatible.Testing
This is a change to a template and a document only. No code paths change, so there are no new tests.
We did the test on a live deployment: Buzz Desktop v0.4.26 on macOS, relay deployed with
deploy/composeand Caddy TLS.Load failed.tauri://localhost,http://tauri.localhosttoBUZZ_CORS_ORIGINS. Restart the relay.