Get device info from header

Hi,
I have a node.js back end with a mobile (ios and android) and web front end.
It is accessed but a limited number of my clients existing customers and he has asked for some logging of who is using what device to access he system.
I know I can use the browser component to get information and send that back with post etc. but since some info is returned with api calls already (in the header?), is there a way to access this data in the backend to save to a log table?
Thanks.

Hi.
Create a set value and set its value as {{$_HEADER}} and see what all data is captured there.
You can also check of {{$_SERVER}} for some info.

1 Like

As sid says, create a variable under $_SERVER. User agent should give you what you need.

Thanks Sid and Max, I will have a play and report back.

Hi Sid and Max,

Spot on responses. Added HTTP_USER_AGENT and REMOTE_ADD to $_SERVER and it gives me the device details and their IP address which I can reference and add to my logging table.

Thanks.