Skip to content

Conversation

@agents-git-bot
Copy link
Contributor

@agents-git-bot agents-git-bot bot commented Jan 13, 2026

Summary

Update Sandbox documentation to reflect changes from cloudflare/sandbox-sdk PR #352:

What Changed

  • Custom token support: Users can now provide custom tokens when exposing ports for stable preview URLs
  • Breaking change: Custom tokens no longer support hyphens - only lowercase letters (a-z), numbers (0-9), and underscores (_) are allowed
  • URL format update: Preview URLs now include tokens in the format {port}-{sandbox-id}-{token}.domain.com

Documentation Updates

  • Updated Ports API reference (/sandbox/api/ports/) to document the new token parameter and custom token requirements
  • Updated Preview URLs concept (/sandbox/concepts/preview-urls/) to explain token types and the new URL format with examples
  • Updated Expose Services guide (/sandbox/guides/expose-services/) to include stable URL patterns and custom token best practices
  • Updated all example URLs throughout the sandbox docs to reflect the new token-based format

Breaking Change Impact

Existing preview URLs with hyphenated custom tokens will fail until ports are re-exposed with valid tokens (no hyphens). This change fixes preview URL parsing for sandbox IDs containing hyphens (UUIDs).


Source: cloudflare/sandbox-sdk#352

@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

@agents-git-bot agents-git-bot bot changed the title Update Sandbox SDK docs for custom port token format changes (PR #352) Fix preview URL parsing for sandbox IDs with hyphens Jan 14, 2026
- Add custom token support for exposePort() API
- Document breaking change: tokens no longer support hyphens
- Update URL format throughout docs to include tokens
- Add examples for stable URLs with custom tokens

Reflects changes from cloudflare/sandbox-sdk PR 352
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.

2 participants