get user agent in server component
Unanswered
Giant panda posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Giant pandaOP
how can i get user agent in server component?
in app router
in app router
8 Replies
![Avatar](https://cdn.discordapp.com/avatars/301376057326567425/788b75eb8862277af3d31d317ada783f.webp?size=256)
B33fb0n3
You can get them thought the headers
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Giant pandaOP
i tried but i have in my headers only cookies not user agent is always null
![Avatar](https://cdn.discordapp.com/avatars/301376057326567425/788b75eb8862277af3d31d317ada783f.webp?size=256)
B33fb0n3
Are you able to log all headers?
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Giant pandaOP
yeah all empty
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Giant pandaOP
bound Headers {
Symbol(headers list): HeadersList {
cookies: null,
Symbol(headers map): Map {},
Symbol(headers map sorted): null
},
Symbol(guard): 'none'
}
Symbol(headers list): HeadersList {
cookies: null,
Symbol(headers map): Map {},
Symbol(headers map sorted): null
},
Symbol(guard): 'none'
}
![Avatar](https://cdn.discordapp.com/avatars/301376057326567425/788b75eb8862277af3d31d317ada783f.webp?size=256)
B33fb0n3
Hm weird. Then I don’t have a solution. Sorry
![Avatar](https://cdn.discordapp.com/embed/avatars/2.png)
Giant pandaOP
ok thank you
any one else??