When client is initiating a request to access the restapi, i need them to pass the details of hostname and IP on the same resource of the url and capture it in the log. Please help me with the sample code.
This might do what you want: https://github.com/tomasen/realip
This post helps to get the IP address of a HTTP request, if i understood the question correctly. https://golangcode.com/get-the-request-ip-addr/
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.