get user agent in server component
Unanswered
Giant panda posted this in #help-forum
Giant pandaOP
how can i get user agent in server component?
in app router
in app router
8 Replies
You can get them thought the headers
Giant pandaOP
i tried but i have in my headers only cookies not user agent is always null
Are you able to log all headers?
Giant pandaOP
yeah all empty
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'
}
Hm weird. Then I don’t have a solution. Sorry
Giant pandaOP
ok thank you
any one else??