Skip to content

Redirect gratitext.app to www.gratitext.app - #100

Merged
kody-bot merged 1 commit into
mainfrom
cursor/apex-redirect-to-www-b50d
Sep 14, 2026
Merged

kody-bot merged 1 commit into
mainfrom
cursor/apex-redirect-to-www-b50d

Conversation

@kentcdodds

Copy link
Copy Markdown
Member

The apex domain now has DNS records and a Fly certificate (added via Kody earlier today), so the app serves on both gratitext.app and www.gratitext.app. Session cookies are host-scoped and search engines should see a single origin, so this 301s the apex to www in the same Express middleware that already forces HTTPS. Other hosts (localhost, gratitext.fly.dev) are untouched.

Test Plan

  • bun run typecheck, bun run lint pass.
  • Against the dev server with spoofed headers:
    • Host: gratitext.app /login?redirectTo=%2Frecipients301 https://www.gratitext.app/login?redirectTo=%2Frecipients
    • Host: gratitext.app + X-Forwarded-Proto: http301 https://www.gratitext.app/ (one hop, not two)
    • Host: www.gratitext.app + X-Forwarded-Proto: http302 https://www.gratitext.app/ (existing behaviour)
    • localhost200

Checklist

  • Tests updated
  • Docs updated
Open in Web Open in Cursor 

gratitext.app now resolves to the app too, but session cookies are
host-scoped and search engines should see one origin, so 301 it to
www.gratitext.app in the same middleware that forces HTTPS.

Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds

Copy link
Copy Markdown
Member Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 8865b73. Configure here.

@kody-bot
kody-bot merged commit 648fd40 into main Sep 14, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants