brackt/app/lib/__tests__
Claude ed9c62571b
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m21s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m20s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix three defects in the Sentry 404 filter
Code review of 41a0237 found the same-origin Referer exception never
fires in production, which defeats the guarantee that change was built
on: broken internal links stay visible while scanners are dropped.

@react-router/express builds request.url from req.protocol and nothing
sets `trust proxy`, so request.url reads http:// inside the container
while browsers send an https:// Referer. Comparing full origins never
matched, so every router-internal 4xx was dropped. Compare host instead
-- protocol says nothing about whether a link was ours, and this is the
same mismatch $leagueId.server.ts already works around for invite URLs.
Adding `trust proxy` would fix it too but changes req.ip and req.secure
server-wide for one comparison.

Removing ignoreErrors also dropped the .css/.js filters with nothing to
replace them. Stale clients request the previous deploy's hashed bundles
with a same-host Referer, so once the Referer check worked, every deploy
would spike Sentry. Assets now never report, referer or not.

Narrow the dropped statuses from all 4xx to 404 and 405, the two that
mean nothing matched the request. React Router's internal 400 (route
missing a loader) and 403 (route does not match URL) are real
misconfigurations and were being swallowed whenever no Referer was sent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ESrxBMZMx2BD9rcKTCgLe4
2026-09-14 21:18:33 +00:00
..
afl-wildcard-reseed.test.ts Re-seed AFL Wildcard winners into the Elimination Finals 2026-09-04 15:13:13 +00:00
bracket-layout.test.ts Only derive feeders where the halving rule actually holds 2026-08-21 18:18:05 +00:00
cloudinary-url.test.ts Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
cloudinary.server.test.ts Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
date-utils.test.ts claude/practical-newton-4v041g (#98) 2026-06-18 02:33:05 +00:00
draft-eligibility.test.ts Show why a participant is ineligible to draft (#378) 2026-05-04 21:54:14 -07:00
draft-order.test.ts Fix draft order initialization for teams added mid-season (#449) 2026-05-19 18:22:47 -07:00
draft-timer.test.ts Extract chess clock presets to shared constant (#432) 2026-05-15 14:02:49 -07:00
email.server.test.ts Add branded dark-themed HTML email template (#402) 2026-05-10 11:18:57 -07:00
error-reporting.test.ts Fix three defects in the Sentry 404 filter 2026-09-14 21:18:33 +00:00
fifa-2026-bracket.test.ts Reflect group stage in World Cup sim; seed R32 from real 2026 bracket 2026-06-23 12:15:45 -07:00
flag-generator.test.ts Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
normalize-team-name.test.ts Auto-populate & auto-score tennis Grand Slam brackets from Wikipedia 2026-06-26 21:48:00 -07:00
overnight-pause.test.ts Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
parse-results-text.test.ts feat: batch qualifying results entry (#290) 2026-04-12 14:52:22 -07:00
season-helpers.server.test.ts feat: add recharts library and implement PointProgressionChart component for historical views 2025-11-14 21:18:34 -08:00
sport-icon-url.test.ts Harden sport icon cleanup (#397) 2026-05-08 21:19:09 -07:00
standings-display.test.ts Show tied ranks with T prefix across standings and Discord (#239) 2026-03-27 20:45:15 -07:00
unmatched-team-reconciliation.test.ts Improve unmatched team reconciliation UX (#425) 2026-05-14 16:45:02 -07:00
utils.test.ts Fix oxlint warnings: no-shadow, consistent-function-scoping, no-non-null-assertion, and others (#196) 2026-03-21 10:59:51 -07:00