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

How to add header CloudFront-Is-Mobile-Viewer in AWS Amplify? #3322

Closed
4 tasks done
caiodounis opened this issue Feb 21, 2023 · 6 comments
Closed
4 tasks done

How to add header CloudFront-Is-Mobile-Viewer in AWS Amplify? #3322

caiodounis opened this issue Feb 21, 2023 · 6 comments
Labels
archived This issue has been locked. compute feature-request New feature or request

Comments

@caiodounis
Copy link

caiodounis commented Feb 21, 2023

Before opening, please confirm:

App Id

dnzn4ifojcrc4

AWS Region

us-east-1

Amplify Hosting feature

Custom headers

Question

I'm using nextjs 13 with aws amplify, and I'm trying to identify the user's device using the request header user-agent but I can see the header is coming with a fixed value Amazon Cloudfront. After a brief research I saw a couple of tutorials on how to add the headers like CloudFront-Is-Mobile-Viewer in a cloudfront distribution, but I wasn't able to do that in AWS Amplify. How can I add that header in the request headers in AWS Amplify?

@caiodounis caiodounis added the question Further information is requested label Feb 21, 2023
@ghost ghost self-assigned this Feb 22, 2023
@ghost ghost added compute feature-request New feature or request and removed question Further information is requested labels Feb 22, 2023
@ghost
Copy link

ghost commented Feb 23, 2023

Hi @caiodounis 👋🏽 thanks for raising this question. We do not have a way of allowing customers to use this CloudFront header at this time but we are tracking this as a feature request.

@github-actions
Copy link

This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!

@caiodounis
Copy link
Author

Hi @hloriana thanks for the reply!
Is there any other way to make Amplify not mask the user-agent header?
This way I would be able to identify the device.

@ghost ghost removed their assignment Apr 14, 2023
@mauerbac
Copy link
Member

This feature has just been supported with our latest launch! Closing.

Check out the details here: https://aws.amazon.com/blogs/mobile/cdn-caching-improvements-for-better-app-performance-with-aws-amplify-hosting/

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Copy link

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Aug 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. compute feature-request New feature or request
Development

No branches or pull requests

2 participants