H
Honoโ€ข6mo ago
edo999

Get the user IP address

Is there no better way to get the user IP address than doing this ๐Ÿ‘‡๐Ÿฝ? https://github.com/EdamAme-x/deno-deploy-hono-ip/blob/main/entry.ts It works, but it's a bit convoluted. FYI, I use the IP address to implement a rate limiter.
GitHub
deno-deploy-hono-ip/entry.ts at main ยท EdamAme-x/deno-deploy-hono-ip
Deno Deploy Hono IP. Contribute to EdamAme-x/deno-deploy-hono-ip development by creating an account on GitHub.
2 Replies
Nico
Nicoโ€ข6mo ago
You should be able to use this as long as you use Deno serve https://hono.dev/docs/helpers/conninfo
ConnInfo Helper - Hono
Ultrafast web framework for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.
edo999
edo999OPโ€ข6mo ago
Ah yes! It works and it's much cleaner. Thank you ๐Ÿ’Ÿ

Did you find this page helpful?