Skip to content

Commit 427b0b1

Browse files
Apply suggestions from code review
Co-authored-by: Rachael Stavchansky <rachael@netlify.com>
1 parent 5270b1d commit 427b0b1

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Essential Next.js Build Plugin (beta)
44

5-
:warning: This is the beta version of the Essential Next.js plugin. For the stable version, see
5+
:warning: This is the beta version of the Essential Next.js plugin. For the stable version, refer to
66
[Essential Next.js plugin v3](https://github.com/netlify/netlify-plugin-nextjs/tree/v3#readme) :warning:
77

88
<p align="center">
@@ -16,7 +16,7 @@
1616

1717
## What's new in this version
1818

19-
Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, see
19+
Version 4 is a complete rewrite of the Essential Next.js plugin. For full details of everything that's new, check out
2020
[the v4 release notes](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/release-notes/v4.md)
2121

2222
## Installing the beta
@@ -53,7 +53,7 @@ If you currently use redirects or rewrites on your site, see
5353
[the Rewrites and Redirects guide](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/redirects-rewrites.md)
5454
for information on changes to how they are handled in this version.
5555

56-
If you want to use Next 12's beta middleware feature, this will mostly work as expected but please
56+
If you want to use Next 12's beta Middleware feature, this will mostly work as expected but please
5757
[read the docs on some caveats and workarounds](https://github.com/netlify/netlify-plugin-nextjs/blob/main/docs/middleware.md)
5858
that are currently needed.
5959

docs/middleware.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Using Next 12 middleware on Netlify
22

3-
Next 12 introduces a new feature called [middleware](https://nextjs.org/docs/middleware), which are functions that are
4-
run before a request has finished processing, and can be used to modify the request or replace the response. For
3+
Next 12 introduces a new feature called [Middleware](https://nextjs.org/docs/middleware), in which functions
4+
run before a request has finished processing. Middleware can be used to modify the request or replace the response. For
55
example, it can change headers, rewrite the request path, or return a different response entirely.
66

7-
Next Middleware can run either in an edge function or at the origin. On Netlify, middleware runs at the origin as part
7+
Next.js Middleware can run either in an edge function or at the origin. On Netlify, middleware runs at the origin as part
88
of the normal Next.js server.
99

1010
## How to deploy Next 12 middleware
@@ -15,7 +15,7 @@ workarounds that are currently required for some features during the beta period
1515

1616
### `geo`
1717

18-
When running at the origin, Next does not populate the `request.geo` object. Fortunately there is a one line fix to get
18+
When running at the origin, Next.js does not populate the `request.geo` object. Fortunately there is a one line fix to get
1919
the visitor's country:
2020

2121
```typescript
@@ -42,8 +42,8 @@ export async function middleware(req: NextRequest) {
4242

4343
## Caveats
4444

45-
Because the middleware runs at the origin, it is run _after_ Netlify rewrites and redirects. If a static file is served
46-
then it is never run, as it is only run when a page is served by Next.js. This means that it should not be used with the
45+
Because the middleware runs at the origin, it is run _after_ Netlify rewrites and redirects. If a static file is served by the Netlify CDN
46+
then the middleware is never run, as middleware only runs when a page is served by Next.js. This means that middleware should not be used with the
4747
`EXPERIMENTAL_MOVE_STATIC_FILES` option, as this causes statically-generated pages to be served by the Netlify CDN
4848
before any middleware can be run.
4949

@@ -72,5 +72,5 @@ export function middleware(req: NextRequest) {
7272
}
7373
```
7474

75-
If you have any issues with middleware on Netlify while it is beta, particularly if they cannot be reproduced when
76-
running locally, then please add a comment to [the Next plugin beta discussion](https://ntl.fyi/next-beta-feedback)
75+
If you have an issue with Next.js middleware on Netlify while it is beta, particularly if the issue cannot be reproduced when
76+
running locally, then please add a comment to [the Next plugin beta discussion](https://ntl.fyi/next-beta-feedback).

0 commit comments

Comments
 (0)