Skip to content

Conversation

@msukkari
Copy link
Contributor

@msukkari msukkari commented Jan 21, 2026

Fixes hardcoded localhost in org URL and invite links by using AUTH_URL as fallback in getBaseUrl.

The getBaseUrl function previously defaulted to localhost:3000 when request headers were missing, leading to incorrect URLs in emails and other contexts. This change ensures that the canonical AUTH_URL is used when headers are unavailable. Email preview props were also updated for consistency.

Fixes #763


Linear Issue: SOU-238

Open in Cursor Open in Web

…seUrl

- Updated getBaseUrl() in utils.ts to fall back to AUTH_URL environment
  variable instead of hardcoded 'localhost:3000' when headers are not
  available
- Updated email preview props in inviteUserEmail.tsx,
  joinRequestApprovedEmail.tsx, and joinRequestSubmittedEmail.tsx to use
  example.sourcebot.dev instead of localhost URLs

This fixes the issue where org URL and invite links were being generated
with localhost when the host/protocol headers were not available.

Co-authored-by: michael <michael@sourcebot.dev>
@cursor
Copy link

cursor bot commented Jan 21, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@coderabbitai
Copy link

coderabbitai bot commented Jan 21, 2026

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Changed example URL from example.sourcebot.dev to sourcebot.example.com
- Added changelog entry for PR #764

Co-authored-by: michael <michael@sourcebot.dev>
@msukkari msukkari marked this pull request as ready for review January 21, 2026 00:20
@msukkari msukkari changed the title Hardcoded localhost URLs fix(invite): Fix localhost being used in invite links and in UI Jan 21, 2026
@msukkari msukkari merged commit d6212de into main Jan 21, 2026
9 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.

[bug] localhost being hardcoded in org URL and invite links

3 participants