Skip to content

fix(core): derive widget domain from registrable host - #991

Open
AnayGarodia wants to merge 2 commits into
alpic-ai:mainfrom
AnayGarodia:fix/widget-domain-tld-359
Open

fix(core): derive widget domain from registrable host#991
AnayGarodia wants to merge 2 commits into
alpic-ai:mainfrom
AnayGarodia:fix/widget-domain-tld-359

Conversation

@AnayGarodia

Copy link
Copy Markdown

Summary

Uses tldts to derive the default widget domain from the server hostname. A server such as capitals.skybridge.tech now emits skybridge.tech, while localhost and other non-registrable hosts safely retain the existing origin fallback.

Closes #359

Testing

  • Core package test suite: 335 tests passed across 50 files
  • Core Biome formatting check passed

Copilot AI review requested due to automatic review settings July 22, 2026 08:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR derives the default widget domain from the server's registrable hostname. The main changes are:

  • Adds tldts for registrable-domain parsing.
  • Preserves tenant-specific domains on private suffixes.
  • Keeps the existing origin fallback for non-registrable hosts.
  • Adds coverage for subdomains, private suffixes, and localhost.

Confidence Score: 5/5

This looks safe to merge.

  • Forwarded host lists now select the first hop before URL parsing.
  • Private suffix parsing keeps hosted tenants on separate widget domains.
  • No blocking issues remain in the changed code.

Reviews (2): Last reviewed commit: "fix(core): isolate private-suffix widget..." | Re-trigger Greptile

Comment thread packages/core/src/server/requestOrigin.ts
Comment thread packages/core/src/server/requestOrigin.ts Outdated
@harijoe

harijoe commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Hi @AnayGarodia, thanks for your contribution!

Since this is your first time contributing to the Skybridge repository, would you mind introducing yourself on our Discord? We'd love to get to know our contributors.

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.

Update default openai/widgetDomain to host TLD

3 participants