You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/workers/static-assets/compatibility-matrix.mdx
+57-20Lines changed: 57 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,29 +17,42 @@ import {
17
17
Tabs,
18
18
} from"~/components";
19
19
20
-
Cloudflare [Workers with static assets](/workers/static-assets/) and [Pages](/pages/) both have the ability to host front-end and full-stack applications. The following compatibility matrix shows the features are available for each product to help you when choosing which product to start with.
20
+
You can deploy full-stack applications, including front-end static assets and back-end APIs and server-side rendered pages (SSR), to both Cloudflare [Workers](/workers/static-assets/) and [Pages](/pages/). The compatibility matrix below shows which features are available for each, to help you choose whether to build with Workers or Pages. Unless otherwise stated below, what works in Pages works in Workers, and what works in Workers works in Pages. Think something is missing from this list? [Open a pull request](https://github.com/cloudflare/cloudflare-docs/edit/production/src/content/docs/workers/static-assets/compatibility-matrix.mdx) or [create a GitHub issue](https://github.com/cloudflare/cloudflare-docs/issues/new).
21
21
22
22
We plan to bridge the gaps between Workers and Pages and provide ways to migrate your Pages projects to Workers.
<sup>1</sup> If you need to run a Worker script ahead of serving static assets,
56
-
we currently recommend using [Service
79
+
<sup>1</sup> For more details on which bindings are supported in remote development, [refer to the docs](/workers/testing/local-development/#supported-resource-bindings-in-different-environments).
80
+
81
+
<sup>2</sup> Similar to <sup>1</sup>, to customize the HTTP headers that
82
+
are returned by static assets, you can use [Service
57
83
bindings](/workers/runtime-apis/bindings/service-bindings/) to connect a Worker
58
-
in front of the Worker with assets. We plan to explore additional configuration
84
+
in front of the Worker with assets.
85
+
86
+
<sup>3</sup> If you need to run a Worker before serving static assets,
87
+
you can create a separate Worker that acts as middleware, and then use [Service
88
+
bindings](/workers/runtime-apis/bindings/service-bindings/) to forward the request
89
+
to the Worker with assets. We plan to explore additional configuration
59
90
to support more complex routing in the future.
60
91
61
-
<sup>2</sup> You can handle redirects by adding code to your Worker (a
92
+
<sup>4</sup> You can handle redirects by adding code to your Worker (a
62
93
[community package](https://npmjs.com/package/redirects-in-workers) is available
Placement](/workers/configuration/smart-placement/)projects with static assets.
68
-
This is a temporary limitation, we are working to remove it.
97
+
<sup>5</sup> You cannot yet enable [Smart
98
+
Placement](/workers/configuration/smart-placement/)for Workers with static assets.
99
+
This is a temporary limitation we are working to remove.
69
100
70
-
<sup>4</sup> You cannot yet add a [Tail
101
+
<sup>6</sup> You cannot yet add a [Tail
71
102
Worker](/workers/observability/logs/tail-workers/) to a project with assets.
72
-
This is a temporary limitation, we are working to remove it.
103
+
This is a temporary limitation we are working to remove.
104
+
105
+
<sup>7</sup> To [use Durable Objects with your Cloudflare Pages project](/pages/functions/bindings/#durable-objects), you must create a separate Worker with a Durable Object and then declare a binding to it in both your Production and Preview environments. Using Durable Objects with Workers is simpler and recommended.
106
+
107
+
<sup>8</sup> Workers [supports popular frameworks](/workers/frameworks/), many of which implement file-based routing.
108
+
109
+
<sup>9</sup> Everything that is possible with Pages Functions can also be achieved by adding code to your Worker or by using framework-specific plugins for relevant third party tools.
0 commit comments