Skip to content

Commit

Permalink
chore(docs): fix middleware verbiage (#5981)
Browse files Browse the repository at this point in the history
* Make documentation easier to understand

* Apply suggestions from code review

Co-authored-by: Nico Domino <yo@ndo.dev>

Co-authored-by: Nico Domino <yo@ndo.dev>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
  • Loading branch information
3 people committed Dec 31, 2022
1 parent 554ec43 commit d1dd8d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/docs/tutorials/securing-pages-and-api-routes.md
Expand Up @@ -42,7 +42,7 @@ export default function Page() {

### Next.js (Middleware)

With NextAuth.js 4.2.0 and Next.js 12, you can now protect your pages via the middleware pattern more easily. If you would like to protect all pages, you can create a `middleware.js` file in your root `pages` directory which looks like this:
With NextAuth.js 4.2.0 and Next.js 12, you can now protect your pages via the middleware pattern more easily. If you would like to protect all pages, you can create a `middleware.js` file at the root or in the src directory (same level as your `pages`) which looks like this:

```js title="/middleware.js"
export { default } from "next-auth/middleware"
Expand Down

1 comment on commit d1dd8d9

@vercel
Copy link

@vercel vercel bot commented on d1dd8d9 Dec 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.