Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include client's User-Agent header in requests to NextJS server from NextJSProxyView #33

Merged
merged 1 commit into from
Jul 7, 2024
Merged

Include client's User-Agent header in requests to NextJS server from NextJSProxyView #33

merged 1 commit into from
Jul 7, 2024

Conversation

Lizards
Copy link
Contributor

@Lizards Lizards commented Jul 2, 2024

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.)

@danialkeimasi
Copy link
Member

Thank you for your contribution!

@danialkeimasi danialkeimasi merged commit aab153a into QueraTeam:main Jul 7, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants