Skip to content

Commit ee573a3

Browse files
committed
address comments
1 parent 1a523fa commit ee573a3

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/content/docs/cloudflare-for-platforms/workers-for-platforms/platform/worker-isolation.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@ By default, Workers inside of a dispatch namespace are considered "untrusted." T
1313
In untrusted mode:
1414

1515
- The [`request.cf`](/workers/runtime-apis/request/#incomingrequestcfproperties) object is not available in Workers (see [limits](/cloudflare-for-platforms/workers-for-platforms/platform/limits/#cf-object) for more information)
16-
- Each Worker has an isolated cache space when using the Cache API
17-
- Workers cannot access cached responses from other Workers in the namespace
16+
- Each Worker has an isolated cache, when using the [Cache API](/workers/runtime-apis/cache/) or when making subrequests using `fetch()`, which egress via [Cloudflare's cache](/cache/)
1817
- [`caches.default`](/workers/reference/how-the-cache-works/#cache-api) is disabled for all Workers in the namespace
1918

2019
This mode ensures complete isolation between customer Workers, preventing any potential cross-tenant data access.
2120

2221
### Trusted Mode
2322

24-
If you control the Worker code and want to disable isolation mode, you can configure the namespace as "trusted".
23+
If you control the Worker code and want to disable isolation mode, you can configure the namespace as "trusted". This is useful when building internal platforms where your company controls all Worker code.
2524

2625
In trusted mode:
2726

@@ -32,10 +31,6 @@ In trusted mode:
3231
In trusted mode, Workers can potentially access cached responses from other Workers in the namespace. Only enable this if you control all Worker code or have appropriate cache key isolation strategies.
3332
:::
3433

35-
### Maintaining cache isolation in trusted mode
36-
If you need access to `request.cf` but want to maintain cache isolation between customers, use customer-specific [cache keys](/workers/examples/cache-using-fetch/#custom-cache-keys) or the [Cache API](/workers/examples/cache-api/) with isolated keys.
37-
38-
3934
To convert a namespace from untrusted to trusted:
4035
```bash
4136
curl -X PUT "https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/dispatch/namespaces/{namespace_name}" \
@@ -49,6 +44,9 @@ curl -X PUT "https://api.cloudflare.com/client/v4/accounts/{account_id}/workers/
4944

5045
If you enable trusted mode for a namespace that already has deployed Workers, you'll need to redeploy those Workers for the `request.cf` object to become available. Any new Workers you deploy after enabling trusted mode will automatically have access to it.
5146

47+
### Maintaining cache isolation in trusted mode
48+
If you need access to `request.cf` but want to maintain cache isolation between customers, use customer-specific [cache keys](/workers/examples/cache-using-fetch/#custom-cache-keys) or the [Cache API](/workers/examples/cache-api/) with isolated keys.
49+
5250
## Related Resources
5351
* [Platform Limits](/cloudflare-for-platforms/workers-for-platforms/platform/limits) - Understanding script and API limits
5452
* [Cache API Documentation](/workers/runtime-apis/cache/) - Learn about cache behavior in Workers

0 commit comments

Comments
 (0)