Is it somehow possible to find out the IP address of a client accessing my app on Backendless? For example when they make a request to the Data Service or a custom event handler?
Hi Simon,
No, we do not pass that information to custom business logic in the current implementation. There is an internal ticket request that change, it will be possible soon.
Regards,
Mark
Hi Mark,
I was wondering if this feature has been implemented yet.
Hi Mark,
Has this feature been added yet?
Hello @William_Lee
Could you check if this code shows your IP?
console.log(
request.context.httpHeaders['X-Real-IP'],
request.context.httpHeaders['X-Forwarded-For']
)
Where request is an argument that comes to the API method.
Also how it looks with Codeless:
Hi Dima Iβm not sure about what Iβm doing here. I duplicated the API Service but then I wasnβt sure how to call it or If i needed to add some input header information.
Hello @William_Lee
- Create BL Service
- Add onClick logic on button in ui-builder
- Open browser terminal and open βconsoleβ tab in preview app
Regards,
Viktor
Hi Victor, I restructured codeless like you did and then ran it.
Looks like it returned the URL but not the IP address?
Returned data should be shown in Console tab because we print it. Also, you could find it at Network - Response of your request.
Looking about the IP address, I found this solution:
And is easy:
Please donβt hesitate to ask, Mario