How can I get user IP after user post a form in collection type

Hi, i have few questions.
First: can i get IP in lifecycle hook afterCreate? how can i do this?
Second: can u give me some tips for get user ip in strapi?

Thank you so much

I don’t think you can access this in the lifecycle hooks, but you can access it in a controller or a middleware.
As it would be part of the request head that is sent to the server.

1 Like