For a personal project, I want to create a game. So if the user loose, he can’t access the game for 30 minutes, there’s no registration or anything like that I just want to store the IP in my database so I can check the last time the user loose. (I built this application to improve my knowledge of Nextjs and React components) But the fact is: I can’t access the client’s IP in the server component that contains my game.
To resume, how can I get the client’s IP inside a server component inside the 'app' directory?
I have to make an API call inside the client component to get the req object and then get the IP but this solution triggers me because it is not optimal for the user experience.