Skip to content

Commit 595329e

Browse files
authored
Merge branch 'production' into ngayerie/SPM-3038-improve-http-error-docs
2 parents a159685 + a85dfba commit 595329e

163 files changed

Lines changed: 3080 additions & 1215 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.opencode/command/review-code-example.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"type": "module",
55
"scripts": {
66
"astro": "npx astro",
7-
"build": "export NODE_OPTIONS='--max-old-space-size=6192' || set NODE_OPTIONS='--max-old-space-size=6192'&& npx astro build",
7+
"build": "export NODE_OPTIONS='--max-old-space-size=6192' || set NODE_OPTIONS=\"--max-old-space-size=6192\" && npx astro build",
88
"typegen:worker": "npx wrangler types ./worker/worker-configuration.d.ts",
99
"check": "npm run check:astro && npm run check:worker",
1010
"check:astro": "npx astro check",
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
title: New functions for array and map operations
3+
description: Rulesets now support split, join, has_key, and has_value functions for advanced expression logic.
4+
date: 2026-01-20
5+
---
6+
7+
## New functions for array and map operations
8+
9+
Cloudflare Rulesets now include new functions that enable advanced expression logic for evaluating arrays and maps. These functions allow you to build rules that match against lists of values in request or response headers, enabling use cases like country-based blocking using custom headers.
10+
11+
---
12+
13+
### New functions
14+
15+
| Function | Description |
16+
| --- | --- |
17+
| `split(source, delimiter)` | Splits a string into an array of strings using the specified delimiter. |
18+
| `join(array, delimiter)` | Joins an array of strings into a single string using the specified delimiter. |
19+
| `has_key(map, key)` | Returns `true` if the specified key exists in the map. |
20+
| `has_value(map, value)` | Returns `true` if the specified value exists in the map. |
21+
22+
---
23+
24+
### Example use cases
25+
26+
**Check if a country code exists in a header list:**
27+
28+
```txt
29+
has_value(split(http.response.headers["x-allow-country"][0], ","), ip.src.country)
30+
```
31+
32+
**Check if a specific header key exists:**
33+
34+
```txt
35+
has_key(http.request.headers, "x-custom-header")
36+
```
37+
38+
**Join array values for logging or comparison:**
39+
40+
```txt
41+
join(http.request.headers.names, ", ")
42+
```
43+
44+
For more information, refer to the [Functions reference](/ruleset-engine/rules-language/functions/).
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
title: "WAF Release - 2026-01-20"
3+
description: Cloudflare WAF managed rulesets 2026-01-20 release
4+
date: 2026-01-20
5+
---
6+
7+
import { RuleID } from "~/components";
8+
9+
This week's release focuses on improvements to existing detections to enhance coverage.
10+
11+
**Key Findings**
12+
13+
- Existing rule enhancements have been deployed to improve detection resilience against SQL injection.
14+
15+
16+
<table style="width: 100%">
17+
<thead>
18+
<tr>
19+
<th>Ruleset</th>
20+
<th>Rule ID</th>
21+
<th>Legacy Rule ID</th>
22+
<th>Description</th>
23+
<th>Previous Action</th>
24+
<th>New Action</th>
25+
<th>Comments</th>
26+
</tr>
27+
</thead>
28+
<tbody>
29+
<tr>
30+
<td>Cloudflare Managed Ruleset</td>
31+
<td>
32+
<RuleID id="a291bd530fa346d18cc1ce5a68d90c8f" />
33+
</td>
34+
<td>N/A</td>
35+
<td>SQLi - Comment - Beta</td>
36+
<td>Log</td>
37+
<td>Block</td>
38+
<td>This rule is merged into the original rule "SQLi - Comment" (ID: <RuleID id="42c424998d2a42c9808ab49c6d8d8fe4" />)</td>
39+
</tr>
40+
<tr>
41+
<td>Cloudflare Managed Ruleset</td>
42+
<td>
43+
<RuleID id="da289f9e692e4f5397d915fbfaa045cf" />
44+
</td>
45+
<td>N/A</td>
46+
<td>SQLi - Comparison - Beta</td>
47+
<td>Log</td>
48+
<td>Block</td>
49+
<td>This rule is merged into the original rule "SQLi - Comparison" (ID: <RuleID id="8166da327a614849bfa29317e7907480" />)</td>
50+
</tr>
51+
</tbody>
52+
</table>

src/content/changelog/waf/scheduled-waf-release.mdx

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
title: WAF Release - Scheduled changes for 2026-01-19
3-
description: WAF managed ruleset changes scheduled for 2026-01-19
4-
date: 2026-01-15
2+
title: WAF Release - Scheduled changes for 2026-01-26
3+
description: WAF managed ruleset changes scheduled for 2026-01-26
4+
date: 2026-01-20
55
scheduled: true
66
---
77

@@ -22,28 +22,6 @@ The planned release has been postponed to ensure a smooth deployment.
2222
</tr>
2323
</thead>
2424
<tbody>
25-
<tr>
26-
<td>2025-12-01</td>
27-
<td>2026-01-19</td>
28-
<td>Log</td>
29-
<td>N/A</td>
30-
<td>
31-
<RuleID id="a291bd530fa346d18cc1ce5a68d90c8f" />
32-
</td>
33-
<td>SQLi - Comment - Beta</td>
34-
<td>This is a beta detection and will replace the action on original detection "SQLi - Comment" (ID: <RuleID id="42c424998d2a42c9808ab49c6d8d8fe4" />)</td>
35-
</tr>
36-
<tr>
37-
<td>2025-12-01</td>
38-
<td>2026-01-19</td>
39-
<td>Log</td>
40-
<td>N/A</td>
41-
<td>
42-
<RuleID id="da289f9e692e4f5397d915fbfaa045cf" />
43-
</td>
44-
<td>SQLi - Comparison - Beta</td>
45-
<td>This is a beta detection and will replace the action on original detection "SQLi - Comparison" (ID: <RuleID id="8166da327a614849bfa29317e7907480" />)</td>
46-
</tr>
4725
<tr>
4826
<td>2025-12-01</td>
4927
<td>2026-01-26</td>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Use auxiliary Workers alongside full-stack frameworks
3+
description: Auxiliary Workers are now fully supported when using full-stack frameworks with the Cloudflare Vite plugin
4+
products:
5+
- workers
6+
date: 2026-01-20
7+
---
8+
9+
Auxiliary Workers are now fully supported when using full-stack frameworks, such as [React Router](/workers/framework-guides/web-apps/react-router/) and [TanStack Start](/workers/framework-guides/web-apps/tanstack-start/), that integrate with the [Cloudflare Vite plugin](/workers/vite-plugin/reference/api/).
10+
They are included alongside the framework's build output in the build output directory.
11+
Note that this feature requires Vite 7 or above.
12+
13+
Auxiliary Workers are additional Workers that can be called via [service bindings](/workers/runtime-apis/bindings/service-bindings/) from your main (entry) Worker.
14+
They are defined in the plugin config, as in the example below:
15+
16+
```ts title="vite.config.ts"
17+
import { defineConfig } from "vite";
18+
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
19+
import { cloudflare } from "@cloudflare/vite-plugin";
20+
21+
export default defineConfig({
22+
plugins: [
23+
tanstackStart(),
24+
cloudflare({
25+
viteEnvironment: { name: "ssr" },
26+
auxiliaryWorkers: [{ configPath: "./wrangler.aux.jsonc" }],
27+
}),
28+
],
29+
});
30+
```
31+
32+
See the Vite plugin [API docs](/workers/vite-plugin/reference/api/) for more info.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
title: Import SQL files as additional modules by default
3+
description: The `.sql` file extension is now automatically configured to be importable in your Worker code
4+
products:
5+
- workers
6+
date: 2026-01-20
7+
---
8+
9+
The `.sql` file extension is now automatically configured to be importable in your Worker code when using [Wrangler](/workers/wrangler/bundling/#including-non-javascript-modules) or the [Cloudflare Vite plugin](/workers/vite-plugin/reference/non-javascript-modules/).
10+
This is particular useful for importing migrations in Durable Objects and means you no longer need to configure custom rules when using [Drizzle](https://orm.drizzle.team/docs/connect-cloudflare-do).
11+
12+
SQL files are imported as JavaScript strings:
13+
14+
```ts
15+
// `example` will be a JavaScript string
16+
import example from "./example.sql";
17+
```

src/content/docs/agents/concepts/agent-class.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class MyAgent extends Agent {
343343
// Add an MCP server
344344
await this.addMcpServer(
345345
"GitHub",
346-
"https://mcp.example.com/sse",
346+
"https://mcp.example.com/mcp",
347347
"https://my-worker.example.workers.dev", // callback host for OAuth
348348
"agents" // routing prefix
349349
);

src/content/docs/agents/guides/remote-mcp-server.mdx

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { Details, Render, PackageManagers } from "~/components";
1111

1212
## Deploy your first MCP server
1313

14-
This guide will show you how to deploy your own remote MCP server on Cloudflare, with two options:
14+
This guide will show you how to deploy your own remote MCP server on Cloudflare using [Streamable HTTP transport](/agents/model-context-protocol/transport/), the current MCP specification standard. You have two options:
1515

1616
- **Without authentication** — anyone can connect and use the server (no login required).
1717
- **With [authentication and authorization](/agents/guides/remote-mcp-server/#add-authentication)** — users sign in before accessing tools, and you can control which tools an agent can call based on the user's permissions.
@@ -22,7 +22,7 @@ The button below will guide you through everything you need to do to deploy this
2222

2323
[![Deploy to Workers](https://deploy.workers.cloudflare.com/button)](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudflare/ai/tree/main/demos/remote-mcp-authless)
2424

25-
Once deployed, this server will be live at your workers.dev subdomain (e.g. remote-mcp-server-authless.your-account.workers.dev/sse). You can connect to it immediately using the [AI Playground](https://playground.ai.cloudflare.com/) (a remote MCP client), [MCP inspector](https://github.com/modelcontextprotocol/inspector) or [other MCP clients](/agents/guides/remote-mcp-server/#connect-your-remote-mcp-server-to-claude-and-other-mcp-clients-via-a-local-proxy). Then, once you're ready, you can customize the MCP server and add your own [tools](/agents/model-context-protocol/tools/).
25+
Once deployed, this server will be live at your workers.dev subdomain (e.g. remote-mcp-server-authless.your-account.workers.dev/mcp). You can connect to it immediately using the [AI Playground](https://playground.ai.cloudflare.com/) (a remote MCP client), [MCP inspector](https://github.com/modelcontextprotocol/inspector) or [other MCP clients](/agents/guides/remote-mcp-server/#connect-your-remote-mcp-server-to-claude-and-other-mcp-clients-via-a-local-proxy). Then, once you're ready, you can customize the MCP server and add your own [tools](/agents/model-context-protocol/tools/).
2626

2727
If you're using the "Deploy to Cloudflare" button, a new git repository will be set up on your GitHub or GitLab account for your MCP server, configured to automatically deploy to Cloudflare each time you push a change or merge a pull request to the main branch of the repository. You can then clone this repository, [develop locally](/agents/guides/remote-mcp-server/#local-development), and start writing code and building.
2828

@@ -50,7 +50,7 @@ In the directory of your new project, run the following command to start the dev
5050
npm start
5151
```
5252

53-
Your MCP server is now running on `http://localhost:8788/sse`.
53+
Your MCP server is now running on `http://localhost:8788/mcp`.
5454

5555
In a new terminal, run the [MCP inspector](https://github.com/modelcontextprotocol/inspector). The MCP inspector is an interactive MCP client that allows you to connect to your MCP server and invoke tools from a web browser.
5656

@@ -64,7 +64,7 @@ Open the MCP inspector in your web browser:
6464
open http://localhost:5173
6565
```
6666

67-
In the inspector, enter the URL of your MCP server, `http://localhost:8788/sse`, and click **Connect**. You should see the "List Tools" button, which will list the tools that your MCP server exposes.
67+
In the inspector, enter the URL of your MCP server, `http://localhost:8788/mcp`, and click **Connect**. You should see the "List Tools" button, which will list the tools that your MCP server exposes.
6868

6969
![MCP inspector — authenticated](~/assets/images/agents/mcp-inspector-authenticated.png)
7070

@@ -84,7 +84,7 @@ After deploying, take the URL of your deployed MCP server, and enter it in the M
8484

8585
Now that your MCP server is running, you can use the [`mcp-remote` local proxy](https://www.npmjs.com/package/mcp-remote) to connect Claude Desktop or other MCP clients to it — even though these tools aren't yet _remote_ MCP clients, and don't support remote transport or authorization on the client side. This lets you test what an interaction with your MCP server will be like with a real MCP client.
8686

87-
Update your Claude Desktop configuration to point to the URL of your MCP server. You can use either the `localhost:8787/sse` URL, or the URL of your deployed MCP server:
87+
Update your Claude Desktop configuration to point to the URL of your MCP server. You can use either the `localhost:8788/mcp` URL, or the URL of your deployed MCP server:
8888

8989
```json
9090
{
@@ -93,7 +93,7 @@ Update your Claude Desktop configuration to point to the URL of your MCP server.
9393
"command": "npx",
9494
"args": [
9595
"mcp-remote",
96-
"https://your-worker-name.your-account.workers.dev/sse"
96+
"https://your-worker-name.your-account.workers.dev/mcp"
9797
]
9898
}
9999
}
@@ -138,7 +138,7 @@ You'll notice that in the example MCP server, if you open `src/index.ts`, the pr
138138
import GitHubHandler from "./github-handler";
139139

140140
export default new OAuthProvider({
141-
apiRoute: "/sse",
141+
apiRoute: "/mcp",
142142
apiHandler: MyMCP.Router,
143143
defaultHandler: GitHubHandler,
144144
authorizeEndpoint: "/authorize",
@@ -178,7 +178,7 @@ Run the following command to start the development server:
178178
npm start
179179
```
180180

181-
Your MCP server is now running on `http://localhost:8788/sse`.
181+
Your MCP server is now running on `http://localhost:8788/mcp`.
182182

183183
In a new terminal, run the [MCP inspector](https://github.com/modelcontextprotocol/inspector). The MCP inspector is an interactive MCP client that allows you to connect to your MCP server and invoke tools from a web browser.
184184

@@ -192,9 +192,9 @@ Open the MCP inspector in your web browser:
192192
open http://localhost:5173
193193
```
194194

195-
In the inspector, set **Transport Type** to `SSE` and enter the URL of your MCP server, `http://localhost:8788/sse`
195+
In the inspector, enter the URL of your MCP server, `http://localhost:8788/mcp`
196196

197-
In the main panel on the right, click the **Open OAuth Settings** button and then click **Quick OAuth Flow**.
197+
In the main panel on the right, click the **OAuth Settings** button and then click **Quick OAuth Flow**.
198198

199199
You should be redirected to a GitHub login or authorization page. After authorizing the MCP Client (the inspector) access to your GitHub account, you will be redirected back to the inspector.
200200

@@ -229,32 +229,37 @@ When you create the first secret, Wrangler will ask if you want to create a new
229229
:::
230230

231231
#### Set up a KV namespace
232-
- Create the KV namespace:
232+
233+
- Create the KV namespace:
234+
233235
```bash
234236
npx wrangler kv namespace create "OAUTH_KV"
235237
```
238+
236239
- Update the `wrangler.jsonc` file with the resulting KV ID:
237240

238241
```json
239242
{
240-
"kvNamespaces": [
241-
{
242-
"binding": "OAUTH_KV",
243-
"id": "<YOUR_KV_NAMESPACE_ID>"
244-
}
245-
]
243+
"kvNamespaces": [
244+
{
245+
"binding": "OAUTH_KV",
246+
"id": "<YOUR_KV_NAMESPACE_ID>"
247+
}
248+
]
246249
}
247250
```
251+
248252
#### Deploy your server
249253

250254
Deploy the MCP server to your Cloudflare `workers.dev` domain:
255+
251256
```bash
252257
npm run deploy
253258
```
254259

255260
#### Finally, connect to your MCP server
256261

257-
Now that you've added the ID and secret of your production OAuth app, you should now be able to connect to your MCP server running at `worker-name.account-name.workers.dev/sse` using the [AI Playground](https://playground.ai.cloudflare.com/), MCP inspector or ([other MCP clients](/agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients)), and authenticate with GitHub.
262+
Now that you've added the ID and secret of your production OAuth app, you should now be able to connect to your MCP server running at `worker-name.account-name.workers.dev/mcp` using the [AI Playground](https://playground.ai.cloudflare.com/), MCP inspector or ([other MCP clients](/agents/guides/remote-mcp-server/#connect-your-mcp-server-to-claude-and-other-mcp-clients)), and authenticate with GitHub.
258263

259264
## Next steps
260265

src/content/docs/agents/model-context-protocol/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can build and deploy [Model Context Protocol (MCP)](https://modelcontextprot
2525

2626
The MCP standard supports two modes of operation:
2727

28-
- **Remote MCP connections**: MCP clients connect to MCP servers over the Internet, establishing a [long-lived connection using HTTP and Server-Sent Events (SSE)](/agents/model-context-protocol/transport/), and authorizing the MCP client access to resources on the user's account using [OAuth](/agents/model-context-protocol/authorization/).
28+
- **Remote MCP connections**: MCP clients connect to MCP servers over the Internet, establishing a connection using [Streamable HTTP](/agents/model-context-protocol/transport/), and authorizing the MCP client access to resources on the user's account using [OAuth](/agents/model-context-protocol/authorization/).
2929
- **Local MCP connections**: MCP clients connect to MCP servers on the same machine, using [stdio](https://spec.modelcontextprotocol.io/specification/draft/basic/transports/#stdio) as a local transport method.
3030

3131
### Best Practices

0 commit comments

Comments
 (0)