Skip to content

Commit 527952f

Browse files
committed
update changeset
1 parent 98e6d7d commit 527952f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.changeset/four-walls-read.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
11
---
2-
"@opennextjs/cloudflare": patch
2+
"@opennextjs/cloudflare": minor
33
---
44

55
Ensure that the initial request.signal is passed to the wrapper
66

7-
`request.signal.onabort` is now supported in route handlers.
7+
8+
9+
`request.signal.onabort` is now supported in route handlers. It requires that the signal from the original worker's request is passed to the handler. It will then pass along that `AbortSignal` through the `streamCreator` in the wrapper. This will destroy the response sent to NextServer when a client aborts, thus triggering the signal in the route handler.
10+
11+
**Note:**
12+
If you have a custom worker, you must update your code to pass the original `request.signal` to the handler.
13+
For example:
14+
15+
```js
16+
// Before:
17+
return handler(reqOrResp, env, ctx);
18+
19+
// After:
20+
return handler(reqOrResp, env, ctx, request.signal);
21+
```

0 commit comments

Comments
 (0)