Skip to content

[Sandboxes] Document named tunnels API#31104

Open
aron-cf wants to merge 5 commits into
productionfrom
sandbox-named-tunnels
Open

[Sandboxes] Document named tunnels API#31104
aron-cf wants to merge 5 commits into
productionfrom
sandbox-named-tunnels

Conversation

@aron-cf
Copy link
Copy Markdown
Contributor

@aron-cf aron-cf commented May 28, 2026

Summary

This adds documentation for the named tunnels API in Sandbox SDK. It also updates references and mentions of exposePorts() to suggest using named tunnels instead.

Documentation checklist

@aron-cf aron-cf requested review from a team, ghostwriternr, scuffi and whoiskatrin as code owners May 28, 2026 09:35
@cloudflare-docs-bot
Copy link
Copy Markdown

cloudflare-docs-bot Bot commented May 28, 2026

Review

⚠️ 2 warnings and 1 suggestion found in full PR diff.

Warnings (2)
File Issue
sandbox/api/tunnels.mdx line 3 Internet (as proper noun) — Frontmatter description uses 'public internet' Fix: Change to 'public Internet'
sandbox/api/tunnels.mdx line 13 Internet (as proper noun) — Prose uses 'public internet' Fix: Change to 'public Internet'
Suggestions (1)
File Issue
sandbox/guides/expose-services.mdx line 18 Semicolons in prose — Line joins two independent clauses with a semicolon: Quick tunnels give you a zero-config *.trycloudflare.com URL; named tunnels bind a stable . hostname. Fix: Break into two sentences.
Commands

Only codeowners can run commands. Post a comment with the command to trigger it.

Command Description
/review Runs a review now. Incremental if a prior review exists, full if not.
/full-review Re-reviews the entire PR diff from scratch, ignoring incremental history. Useful after a rebase, when you want a fresh review, or if the bot gets out of sync and reports issues that no longer exist.

@github-actions
Copy link
Copy Markdown
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, @scuffi, @aron-cf, @cloudflare/product-owners, @cloudflare/ai-agents

@ask-bonk ask-bonk Bot added the documentation Documentation edits label May 28, 2026
Copy link
Copy Markdown
Contributor

@ask-bonk ask-bonk Bot left a comment

Choose a reason for hiding this comment

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

Review complete. 1 build-breaking issue and 6 style guide items need attention before merge.

Comment thread src/content/docs/sandbox/api/tunnels.mdx Outdated
Comment thread src/content/docs/sandbox/api/tunnels.mdx
Comment thread src/content/docs/sandbox/api/tunnels.mdx Outdated
Comment thread src/content/docs/sandbox/api/tunnels.mdx Outdated
Comment thread src/content/docs/sandbox/api/tunnels.mdx Outdated
Comment thread src/content/docs/sandbox/api/tunnels.mdx
Comment thread src/content/docs/sandbox/api/tunnels.mdx
@ask-bonk
Copy link
Copy Markdown
Contributor

ask-bonk Bot commented May 28, 2026

Review posted on PR #31104. Added label: documentation.

What the PR changes
Expands the sandbox.tunnels API reference to document named tunnels (sandbox.tunnels.get(port, { name })), which bind stable hostnames on a user-controlled zone. It also updates callouts across ports.mdx, expose-services.mdx, and production-deployment.mdx to recommend named tunnels over exposePort() for most public-URL use cases.

Issues found

  • CRITICAL | src/content/docs/sandbox/api/tunnels.mdx:167 — Unescaped <name>.<your-zone> in prose will break the MDX build. Must be wrapped in backticks.
  • HIGH | src/content/docs/sandbox/api/tunnels.mdx:261–288 — The named-tunnels TS example is a bare ts fence. Workers JS/TS examples must use <TypeScriptExample>.
  • MEDIUM | src/content/docs/sandbox/api/tunnels.mdx:206 — API reference link /api/operations/permission-groups-list-permission-groups is missing its trailing slash.
  • MEDIUM | src/content/docs/sandbox/api/tunnels.mdx:210curl block uses angle-bracket placeholder <YOUR_GLOBAL_API_KEY_OR_EXISTING_TOKEN>; the style guide requires $VARIABLE_NAME shell-variable format in API examples.
  • MEDIUM | src/content/docs/sandbox/api/tunnels.mdx:338 — Same $VARIABLE_NAME issue with <account-id> in the second curl block.
  • LOW | src/content/docs/sandbox/api/tunnels.mdx:30 — New line uses see; style guide prefers refer to.
  • LOW | src/content/docs/sandbox/api/tunnels.mdx:234CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_ZONE_ID in prose should be monospace.

Out-of-scope notes
HTTP/Websocket on line 28 should be HTTP/WebSocket, but the casing is pre-existing (the PR only changed the verb from will throw to throws). The No musl/Alpine support requirement was removed from the page in this PR; verify that named tunnels still do not work on musl, or re-add that limitation if it still applies.

github run

@mvvmm
Copy link
Copy Markdown
Contributor

mvvmm commented May 28, 2026

/full-review

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.

5 participants