Is there a way to get the UserAgent on the server ...
# ktor
s
Is there a way to get the UserAgent on the server side? I want to have some customized responses for Android/iOS vs Desktop, if not using a UserAgent, is there a different way to approach this?
s
I mean, it's a standard header, so you can get
User-Agent
wherever you have access to request headers
standard disclaimer that user agent sniffing is brittle, easily spoofed/overridden etc