This includes the end user's User-Agent header value in requests to the NextJS server from the NextJSProxyView development proxy.
We ran into an issue with using req.headers['user-agent'] in getServerSideProps to vary API calls between desktop and mobile clients. The User-Agent value was from the Django server, Python-urllib/3.8. (Note that our issue appears fixed after converting from the Pages Router to the App Router, but this could be useful for apps that have not yet converted to App Router.)
This includes the end user's
User-Agent
header value in requests to the NextJS server from theNextJSProxyView
development proxy.We ran into an issue with using
req.headers['user-agent']
ingetServerSideProps
to vary API calls between desktop and mobile clients. TheUser-Agent
value was from the Django server,Python-urllib/3.8
. (Note that our issue appears fixed after converting from the Pages Router to the App Router, but this could be useful for apps that have not yet converted to App Router.)