Fix preview URL DNS compliance by removing underscores #26748
+24
−16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates Sandbox SDK documentation to reflect the DNS-compliant preview URL token format introduced in cloudflare/sandbox-sdk#247.
Changes
https://{port}-{sandbox-id}-{token}.yourdomain.comFiles Modified
src/content/docs/sandbox/concepts/preview-urls.mdx- URL format, token specification, migration note, security detailssrc/content/docs/sandbox/api/ports.mdx- Example URL outputsrc/content/docs/sandbox/guides/expose-services.mdx- URL format examples throughoutsrc/content/docs/sandbox/guides/production-deployment.mdx- URL format in intro and verification exampleContext
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