tasko/middleware.ts

16 lines
366 B
TypeScript
Raw Normal View History

2024-03-21 21:15:27 +00:00
import { clerkMiddleware } from '@clerk/nextjs/server';
import arcjet, { shield } from './lib/arcjet';
import { createMiddleware } from '@arcjet/next';
2024-03-21 21:15:27 +00:00
const aj = arcjet.withRule(
shield({
mode: 'LIVE',
})
);
2024-03-21 21:15:27 +00:00
export const config = {
matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
};
export default createMiddleware(aj, clerkMiddleware());