How to get front end url name

I am using golang gin .
I want to know from where user is requesting api .( like localhost, domain,postaman )
in golang gin ( ctx.Request.Host , ctx.Request.URL.Path ) this is giving api hostname , url not front end url name

The request segment address can be obtained through http.Request.RemoteAddr.

Get the device information of the requester through http.Request.UserAgent() (this depends on what the requester sends)

If you expect to get more information, you should coordinate the requester to send the corresponding information to the server.

If you still don’t understand how it works, you should check the http protocol documentation. This is not what gin needs to do.

1 Like