Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Nov 25, 2025

Summary

Updates Sandbox SDK documentation to reflect the DNS-compliant preview URL token format introduced in cloudflare/sandbox-sdk#247.

Changes

  • URL Format Updates: All preview URL examples now show the correct format with 16-character tokens: https://{port}-{sandbox-id}-{token}.yourdomain.com
  • Token Specification: Added clear documentation that tokens use only lowercase alphanumeric characters and hyphens (RFC 952/1123 compliant)
  • Breaking Change Notice: Added migration note in preview URLs concept page about SDK v0.5.4+ requiring users to regenerate preview URLs
  • Security Clarification: Updated security section to reflect cryptographic randomness and DNS-valid character set

Files Modified

  • src/content/docs/sandbox/concepts/preview-urls.mdx - URL format, token specification, migration note, security details
  • src/content/docs/sandbox/api/ports.mdx - Example URL output
  • src/content/docs/sandbox/guides/expose-services.mdx - URL format examples throughout
  • src/content/docs/sandbox/guides/production-deployment.mdx - URL format in intro and verification example

Context

This change fixes a DNS compliance issue where preview URL tokens could contain underscores (invalid for DNS hostnames per RFC 952/1123). The SDK now generates tokens using only hyphens for URL-unsafe characters. Existing tokens with underscores are automatically migrated, but old preview URLs will stop working.

Related PR: cloudflare/sandbox-sdk#247
Fixes: cloudflare/sandbox-sdk#244

🤖 Generated with Claude Code

@github-actions
Copy link
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents

Updated Sandbox SDK documentation to reflect the DNS-compliant token
format change from PR #247. Preview URL tokens now use only lowercase
alphanumeric characters and hyphens (RFC 952/1123 compliant) instead
of including underscores.

Changes:
- Updated URL format examples to include 16-character tokens
- Added migration note about breaking change in SDK v0.5.4+
- Clarified token security characteristics
- Updated all code examples with correct URL format

This is a breaking change - existing preview URLs with underscores
will stop working after SDK upgrade. Users must call exposePort()
again to get new DNS-compliant URLs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Preview URLs contain underscores which are invalid for DNS hostnames

2 participants