digidem / digidem/comapeo-cloud-app
sentry: hash-prefixed *.pages.dev aliases don't match allowUrls/tracePropagationTargets
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 29
Description
Follow-ups from Opus 5 review of PR #355 (all non-blocking, APPROVE):
-
Hash-prefixed Pages aliases don't match the origin strings. Cloudflare gives every deployment a permanent
https://<hash>.comapeo-cloud-app.pages.devURL; builds there DO have the DSN, but"https://abc.comapeo-cloud-app.pages.dev".includes("https://comapeo-cloud-app.pages.dev")is false, so events/trace headers are dropped. Pre-existing forallowUrls; PR #355 propagates it totracePropagationTargets. Shared fix: makeresolveOrigins()return(string | RegExp)[]and emit/^https:\/\/([a-z0-9-]+\.)?comapeo-cloud-app\.pages\.dev/. -
resolveAllowUrls()null branch is dead code.PAGES_DEV_ORIGINis a hardcoded non-empty constant, soorigins.length > 0is always true; the...(allowUrls ? {allowUrls} : {})false branch and its comment are unreachable. Clean up. -
VITE_CF_PAGES_ORIGINis tested but set nowhere in CI or.env.example— either wire it up or document it.
When the comapeo-cloud API origin is eventually added to tracePropagationTargets, the server must return sentry-trace, baggage in Access-Control-Allow-Headers (preflight otherwise blocks the requests).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating resolveOrigins(), resolveAllowUrls(), and the VITE_CF_PAGES_ORIGIN references, then review the changes from PR #355. Confirm hash-prefixed Pages aliases match both URL controls, remove the unreachable null branch, and either wire up or document the environment variable. Also preserve the stated CORS header requirement for future API trace propagation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vite
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100