按照网上搜的方法:下面三个字段都是空
request.ip
request.headers.get('x-real-ip')
request.headers.get('x-forwarded-for')
看了下 nextjs 文档对 request.ip 的描述:
ip: (string || undefined) - Has the IP address of the Request. This information is provided by your hosting platform.
没怎么看懂,什么叫让我自己平台提供
request.ip
request.headers.get('x-real-ip')
request.headers.get('x-forwarded-for')
看了下 nextjs 文档对 request.ip 的描述:
ip: (string || undefined) - Has the IP address of the Request. This information is provided by your hosting platform.
没怎么看懂,什么叫让我自己平台提供