Skip to content

Commit b7b1c24

Browse files
authored
Adds exporting of ContainerProxy to container egress (#29389)
1 parent ea909e1 commit b7b1c24

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/content/docs/containers/platform-details/outbound-traffic.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ Use outbound Workers to route requests to Workers functions and their bindings (
1717
Use `outbound` to intercept outbound HTTP traffic regardless of destination:
1818

1919
```js
20-
import { Container } from "@cloudflare/containers";
20+
import { Container, ContainerProxy } from "@cloudflare/containers";
21+
export { ContainerProxy };
2122

2223
export class MyContainer extends Container {}
2324

@@ -40,7 +41,8 @@ If needed, you can also upgrade requests to TLS from the Worker itself.
4041
Use `outboundByHost` to map specific domain names or IP addresses to handler functions:
4142

4243
```js
43-
import { Container } from "@cloudflare/containers";
44+
import { Container, ContainerProxy } from "@cloudflare/containers";
45+
export { ContainerProxy };
4446

4547
export class MyContainer extends Container {}
4648

src/content/docs/sandbox/guides/outbound-traffic.mdx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ Use `outbound` to intercept outbound HTTP traffic regardless of destination:
1818

1919
<TypeScriptExample>
2020
```ts
21-
import { Sandbox } from "@cloudflare/sandbox";
21+
import { Sandbox, ContainerProxy } from "@cloudflare/sandbox";
22+
export { ContainerProxy }
2223

2324
export class MySandbox extends Sandbox {}
2425

@@ -44,7 +45,8 @@ Use `outboundByHost` to map specific domain names or IP addresses to handler fun
4445

4546
<TypeScriptExample>
4647
```ts
47-
import { Sandbox } from "@cloudflare/sandbox";
48+
import { Sandbox, ContainerProxy } from "@cloudflare/sandbox";
49+
export { ContainerProxy }
4850
4951
export class MySandbox extends Sandbox {}
5052
@@ -123,7 +125,8 @@ Use `outboundHandlers` to define named handlers, then assign them to specific ho
123125
124126
<TypeScriptExample>
125127
```ts
126-
import { Sandbox } from "@cloudflare/sandbox";
128+
import { Sandbox, ContainerProxy } from "@cloudflare/sandbox";
129+
export { ContainerProxy }
127130

128131
export class MySandbox extends Sandbox {}
129132

@@ -142,7 +145,8 @@ Apply handlers to hosts programmatically from your Worker:
142145

143146
<TypeScriptExample>
144147
```ts
145-
import { getSandbox } from "@cloudflare/sandbox";
148+
import { Sandbox, ContainerProxy, getSandbox } from "@cloudflare/sandbox";
149+
export { ContainerProxy }
146150
147151
export default {
148152
async fetch(request: Request, env: Env) {

0 commit comments

Comments
 (0)