GitXplorerGitXplorer
J

next-middleware

public
0 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
b835b5fc347bb8ce35ecdb4ee14b207d941f0a27

revert prefetch changes

JJay2113 committed 2 years ago
Unverified
e0ca83ac1152347594c9ff91b2a61dc67a01bd2f

added prefetching to /redirected

JJay2113 committed 2 years ago
Unverified
8201f215dfd4ec53310bd6c4e2cd9b00b9f344ae

initial commit

JJay2113 committed 2 years ago
Unverified
6227d62c2fb1d55d1c88c19d8788d547c2403051

Initial commit from Create Next App

JJay2113 committed 2 years ago

README

The README file for this repository.

Middleware

This example shows how to use Middleware in Next.js to run code before a request is completed.

The index page (pages/index.tsx) has a list of links to pages with redirect, rewrite, or normal behavior.

On the Middleware file (middleware.ts) the routes are already being filtered by defining a matcher on the exported config. If you want the Middleware to run for every request, you can remove the matcher.

Deploy your own

Deploy the example using Vercel:

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example middleware middleware-app
yarn create next-app --example middleware middleware-app
pnpm create next-app --example middleware middleware-app

Deploy it to the cloud with Vercel (Documentation).