Hi to all,
Everyday when I see error logs I find these logs

can someone tell me how to stop this we are not using PHP website or Wordpress we have Next Js app
Hi to all,
Everyday when I see error logs I find these logs

can someone tell me how to stop this we are not using PHP website or Wordpress we have Next Js app
Hi, ! Welcome to the Vercel Community ![]()
You could try using Vercel WAF, specifically setting up:
- IP blocking: Learn how to configure IP blocking
- Custom rules: Learn how to configure custom rules for your project
- Managed rulesets: Learn how to enable managed rulesets for your project (Enterprise plan)
https://vercel.com/docs/security/vercel-waf#traffic-control
Let us know how you get on!
Hi pawlean,
Thank your for the response, but is there any way to identify IP address of that person from Vercel dashboard I want to block exact IP from that request.
Hi, !
Thank you for your patience ![]()
To find IP addresses to block on Vercel, you can use the X-Forwarded-For header, which provides the IP address of the client making the request. You can then look for the X-Forwarded-For header in the logs. This header will contain the IP address of the client.
https://vercel.com/docs/edge-network/headers#x-forwarded-for
You can create middleware in your application to log the X-Forwarded-For header.
import { NextResponse } from 'next/server'; import type { NextRequest } from 'next/server';
export function middleware(req: NextRequest) { const clientIp = req.headers.get('x-forwarded-for') || req.ip; console.log('Client IP:', clientIp); return [NextResponse.next](https://nextresponse.next)(); }https://vercel.com/docs/functions/edge-middleware/middleware-api
Let us know how you get on!
We're hosting this event next week on protecting Vercel sites from common attacks, in case it's helpful to you
https://community.vercel.com/t/how-to-protect-your-vercel-site-from-common-attacks/4652