Unverified Commit 2833904b authored by M. Zakiyuddin Munziri's avatar M. Zakiyuddin Munziri Committed by GitHub

Fix typo for rewrites/redirects to rewrite/redirect (#38016)

Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 948f736f
......@@ -84,7 +84,7 @@ export function middleware(request: NextRequest) {
- Middleware can no longer respond with a body
- If your Middleware _does_ respond with a body, a runtime error will be thrown
- Migrate to using `rewrites`/`redirects` to pages/APIs handling a response
- Migrate to using `rewrite`/`redirect` to pages/APIs handling a response
### Explanation
......@@ -101,7 +101,7 @@ NextResponse.json()
### How to upgrade
For cases where Middleware is used to respond (such as authorization), you should migrate to use `rewrites`/`redirects` to pages that show an authorization error, login forms, or to an API Route.
For cases where Middleware is used to respond (such as authorization), you should migrate to use `rewrite`/`redirect` to pages that show an authorization error, login forms, or to an API Route.
#### Before
......@@ -354,6 +354,6 @@ export function middleware(request: NextRequest) {
Prior to Next.js `v12.2`, Middleware was not executed for `_next` requests.
For cases where Middleware is used for authorization, you should migrate to use `rewrites`/`redirects` to Pages that show an authorization error, login forms, or to an API Route.
For cases where Middleware is used for authorization, you should migrate to use `rewrite`/`redirect` to Pages that show an authorization error, login forms, or to an API Route.
See [No Reponse Body](#no-response-body) for an example of how to migrate to use `rewrites`/`redirects`.
See [No Reponse Body](#no-response-body) for an example of how to migrate to use `rewrite`/`redirect`.
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