Unverified Commit 882f3380 authored by Seiya Nuta's avatar Seiya Nuta Committed by GitHub

docs: Update the version history in the middleware page (#41949)



Make it clear that only Next.js 13.0.0 or newer support setting request headers in a middleware.

## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent 288144c7
......@@ -9,6 +9,7 @@ description: Learn how to use Middleware to run code before a request is complet
| Version | Changes |
| --------- | ------------------------------------------------------------------------------------------ |
| `v13.0.0` | Support overriding request headers. |
| `v12.2.0` | Middleware is stable |
| `v12.0.9` | Enforce absolute URLs in Edge Runtime ([PR](https://github.com/vercel/next.js/pull/33410)) |
| `v12.0.0` | Middleware (Beta) added |
......@@ -188,7 +189,7 @@ export function middleware(request: NextRequest) {
## Setting Headers
You can set request and response headers using the `NextResponse` API.
You can set request and response headers using the `NextResponse` API (setting _request_ headers is available since Next.js v13.0.0).
```ts
// middleware.ts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment