Hello, is there a way to get the user IP on a serv...
# suitecommerce
m
Hello, is there a way to get the user IP on a service controller?
s
Service request objects can contain the client IP but I don't think that its use is officially supported
Given the architecture of service controllers specifically, I don't think it's available, so you would have to write a custom service, I think
(But, as I said, I don't think we officially support it.)
f
@Matias Bonifacino from the service controller it doesnt work, it return the ip of the server, but you can do from a suitelet, there is one example in the help for suitescript 2.0
c
@Matias Bonifacino The user's IP is in the list of headers. You can get it by modifying the controller
.ss
file and pulling the header that way. Definitely a bit of a hack. The header you're looking for is something like
HTTP_X_FORWARDED_FOR