Skip to content

Commit 87af46d

Browse files
Add migration note for token format change
Adds critical information for users about the breaking change: - Documents automatic token migration on first access - Advises users to regenerate URLs if they stored/bookmarked old ones - Clarifies the version where this change occurred (v0.4.0) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 2458c98 commit 87af46d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/docs/sandbox/concepts/preview-urls.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ console.log(exposed.exposedAt);
3434

3535
Preview URLs remain stable while a port is exposed and can be shared during that time. However, if you unexpose and re-expose a port, a new random token is generated and the URL changes. For persistent URLs, keep ports exposed for the duration you need them accessible.
3636

37+
:::note[Token format change in v0.4.0]
38+
In SDK version 0.4.0, preview URL tokens were updated to comply with DNS hostname requirements (RFC 952/1123). Tokens now use only lowercase alphanumeric characters and hyphens instead of underscores. Existing preview URLs with underscores are automatically migrated on first access, generating new DNS-compliant tokens. If you have stored or bookmarked old preview URLs, call `exposePort()` again to get updated URLs.
39+
:::
40+
3741
## ID Case Sensitivity
3842

3943
Preview URLs extract the sandbox ID from the hostname to route requests. Since hostnames are case-insensitive (per RFC 3986), they're always lowercased: `8080-MyProject-123.yourdomain.com` becomes `8080-myproject-123.yourdomain.com`.

0 commit comments

Comments
 (0)