Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2024-10-03 08:58:22 -04:00
parent 5213bec5ce
commit ac90ed3fae
No known key found for this signature in database

View File

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