Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2024-10-03 09:14:38 -04:00
parent 7960e5a54f
commit 8668dab43b
No known key found for this signature in database

View File

@ -21,14 +21,7 @@ const aj = arcjet({
], ],
}); });
export default async function middleware(request: NextRequest) { export default async function middleware(req: NextRequest) {
const req = {
...request,
ip: request.headers.get("x-real-ip"),
} as NextRequest;
console.log(req.ip);
const decision = await aj.protect(req); const decision = await aj.protect(req);
console.log(decision); console.log(decision);