0

I have to send a user IP into the logging service on page load. I use static mode in my next.js app.

I have an idea to use an edge function to get visitor IP, pass it as header and then read this value on the frontend. How can I read it? Is there any other reasonable option to pass information like IP or geo into the frontend?

Thanks!

Dominik
  • 31
  • 3
  • I would utilize an api service to do this, most provide 10k+ free per month and then you can cale up as needed - https://stackoverflow.com/questions/391979/how-to-get-clients-ip-address-using-javascript – Ramakay Mar 01 '22 at 15:56

0 Answers0