mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-01-31 00:53:37 +00:00
Add Bot Protection Using Arcjet
This commit is contained in:
parent
611adcddff
commit
a35fdff29f
1 changed files with 13 additions and 6 deletions
|
@ -1,12 +1,19 @@
|
|||
import { clerkMiddleware } from '@clerk/nextjs/server';
|
||||
import arcjet, { shield } from './lib/arcjet';
|
||||
import arcjet, { shield, detectBot } from './lib/arcjet';
|
||||
import { createMiddleware } from '@arcjet/next';
|
||||
|
||||
const aj = arcjet.withRule(
|
||||
shield({
|
||||
mode: 'LIVE',
|
||||
})
|
||||
);
|
||||
const aj = arcjet
|
||||
.withRule(
|
||||
shield({
|
||||
mode: 'LIVE',
|
||||
})
|
||||
)
|
||||
.withRule(
|
||||
detectBot({
|
||||
mode: 'LIVE',
|
||||
allow: ['CATEGORY:SEARCH_ENGINE'],
|
||||
})
|
||||
);
|
||||
|
||||
export const config = {
|
||||
matcher: ['/((?!.*\\..*|_next).*)', '/', '/(api|trpc)(.*)'],
|
||||
|
|
Loading…
Reference in a new issue