How to get client user-agent?

Hi! I have working on a personal phoenix liveview project where I try to log from which browser I log in? The project is basically a bunch of tools I made for me and one of those tool logs when I logged in, from which browser, etc. using “user-agent” header :slight_smile:

After deploying the project on fly, I’m not being able to get the “user-agent” header. I’m not sure why? Does fly automatically removes this header or is it available in different header key?

Thanks!

Hello @aayush,

Maybe this will help. Pass User Agent info to your LiveView · The Phoenix Files

@motdde Thanks for the link! The problem was something else though.

I started logging the headers and it seems I’m getting the user-agent header. It might be error in the code i wrote :man_facepalming:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.