Skip to content

Commit

Permalink
Add middleware to trigger on accessing root
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmytton committed Dec 15, 2023
1 parent 5e455f7 commit 758d41c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions examples/nextjs-14-app-dir-rl/middleware.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { createMiddleware, rateLimit } from "@arcjet/next";
export const config = {
// matcher tells Next.js which routes to run the middleware on
matcher: ["/"],
};
const middleware = createMiddleware({
key: "ajkey_yourkey",
rules: [],
});
export default middleware;

0 comments on commit 758d41c

Please sign in to comment.