How to implement anonymousAllowed rest service api for permitted ip address?

Hi,
How to implement anonymousAllowed rest service api for permitted ip address?

I tried to check address in UserSession, but address for anonymous session are null。

I tried to get userAgent or httprequest, but did not find a way to get it in serviceBean。

Hi

Unfortunately it’s not possible to detect the IP in the service’s code, however you can create a Filter or an interceptor. Alternatively, you can create custom REST controller.

Got you, thanks Vlad。