Open mattbeiswenger opened 12 months ago
Locally I'm not seeing any of the headers in my request that would be needed to determine my IP address. I can, however, see my remote address property which is only accessible on the request object. Here's the API documentation on how to retrieve the remote address on a Node request.
Rewrote application to use bun runtime which doesn't have support for remote address yet so waiting on that
v1.0.4 now has support for requestIp
: https://github.com/oven-sh/bun/releases/tag/bun-v1.0.4
Waiting on https://github.com/oven-sh/bun/issues/4660 to be complete for full support
In order to perform rate limiting, the IP address is required as a unique identifier. After converting from a Next.js route to a server action, I'm unable to retrieve the IP address likely because there's additional information in the HTTP request that's needed to find the IP address whereas the server action only has access to form data. I will need to convert the serve action back to a regular route.