Fix invite link showing http and add draft board link during live draft #48

Merged
chrisp merged 1 commit from fix/invite-link-https-draft-board-link into main 2026-05-23 05:36:34 +00:00
Owner

Summary

  • Invite link https fix: The invite URL on the league page was showing `http://` because the server built the origin directly from `request.url`, which is always `http` behind a TLS-terminating proxy. Now reads `x-forwarded-proto`, allowlisted to `http`/`https` only (falls back to `request.url` origin for anything else — empty value, whitespace, unknown scheme).
  • Draft board card during live draft: The right-column bare DraftInfoCard (showing "View Draft Board", round count, timer mode, draft date) was only shown for `active`/`completed` seasons. Now also shown when `season.status === "draft"` so users can grab the draft board link to share with spectators while the draft is running.

Fixes #33
Fixes #46

Test plan

  • Visit league page on live site — invite link should start with `https://`
  • Set a season to `draft` status — right column should show the "View Draft Board" card with round/timer stats, same as it does after the draft completes
  • Pre-draft season — card should not appear in the right column
  • Active/completed season — card still appears as before
## Summary - **Invite link https fix**: The invite URL on the league page was showing \`http://\` because the server built the origin directly from \`request.url\`, which is always \`http\` behind a TLS-terminating proxy. Now reads \`x-forwarded-proto\`, allowlisted to \`http\`/\`https\` only (falls back to \`request.url\` origin for anything else — empty value, whitespace, unknown scheme). - **Draft board card during live draft**: The right-column bare DraftInfoCard (showing "View Draft Board", round count, timer mode, draft date) was only shown for \`active\`/\`completed\` seasons. Now also shown when \`season.status === "draft"\` so users can grab the draft board link to share with spectators while the draft is running. Fixes #33 Fixes #46 ## Test plan - [ ] Visit league page on live site — invite link should start with \`https://\` - [ ] Set a season to \`draft\` status — right column should show the "View Draft Board" card with round/timer stats, same as it does after the draft completes - [ ] Pre-draft season — card should not appear in the right column - [ ] Active/completed season — card still appears as before
chrisp added 1 commit 2026-05-23 05:27:34 +00:00
Fix invite link showing http and add draft board link during live draft
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m24s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m15s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 48s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
41481a9812
- Use x-forwarded-proto header (allowlisted to http/https only) when
  building the invite link origin so it shows https behind a TLS proxy
- Show "View Draft Board" link in the DraftInfoCard header when the
  draft is actively running, matching the link already shown on
  active/completed seasons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chrisp force-pushed fix/invite-link-https-draft-board-link from 41481a9812 to 3f9c1d99e2 2026-05-23 05:31:59 +00:00 Compare
chrisp merged commit 79e7591dc7 into main 2026-05-23 05:36:34 +00:00
Sign in to join this conversation.
No description provided.