Skip to content

Adds docs and changelog for outbound Workers for Containers & Sandboxes#28846

Open
mikenomitch wants to merge 1 commit intoproductionfrom
nomitch/sandbox-container-outbound-workers
Open

Adds docs and changelog for outbound Workers for Containers & Sandboxes#28846
mikenomitch wants to merge 1 commit intoproductionfrom
nomitch/sandbox-container-outbound-workers

Conversation

@mikenomitch
Copy link
Contributor

Summary

Initial pass at docs for outbound Workers for Containers & Sandboxes

Documentation checklist

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

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

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing
/src/content/docs/containers/ @mikenomitch, @th0m, @cloudflare/pcx-technical-writing, @cloudflare/cloudchamber
/src/content/docs/durable-objects/ @elithrar, @vy-ton, @joshthoward, @oxyjun, @lambrospetrou, @mikenomitch, @cloudflare/pcx-technical-writing
/src/content/docs/sandbox/ @whoiskatrin, @ghostwriternr, @cloudflare/pcx-technical-writing, @cloudflare/ai-agents
/src/content/partials/containers/ @mikenomitch, @th0m, @cloudflare/pcx-technical-writing, @cloudflare/cloudchamber

@gabivlj
Copy link

gabivlj commented Mar 10, 2026

Details around hostname resolution: On release people won't be able to just put made up hostnames on their containers by default.

They either have to:

  1. include their custom hostname in /etc/hosts
  2. have their software hit any IP:port but put in the Host header the hostname they want to route by.

We are hoping to get this as soon as possible.

@mikenomitch mikenomitch force-pushed the nomitch/sandbox-container-outbound-workers branch from e8d71d0 to ed10b8b Compare March 10, 2026 03:59
@mikenomitch mikenomitch marked this pull request as ready for review March 10, 2026 04:04

- None.

### `interceptAllOutboundHttp`
Copy link

Choose a reason for hiding this comment

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

tyhere is two interceptAllOutboundHttp sections

`interceptAllOutboundHttp` routes all outbound HTTP requests from the container through a `WorkerEntrypoint`, regardless of destination.

```js
const worker = this.ctx.exports.MyWorker();
Copy link

Choose a reason for hiding this comment

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

Suggested change
const worker = this.ctx.exports.MyWorker();
const worker = this.ctx.exports.MyWorker({ props: {} });


`interceptAllOutboundHttp` routes all outbound HTTP requests from the container through a `WorkerEntrypoint`, regardless of destination.

```js
Copy link

Choose a reason for hiding this comment

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

Suggested change
```js
```js
export class MyWorker extends WorkerEntrypoint {
fetch() {
return new Response('hello world!');
}
}

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