Added Arcjet Security and Updated Caching on Cards

This commit is contained in:
Ahmad 2024-12-27 18:00:27 -05:00
parent 06aac8524a
commit 611adcddff
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
9 changed files with 261 additions and 19 deletions

View file

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