-
Notifications
You must be signed in to change notification settings - Fork 116
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
Browser user-agent not available in AWS Amplify #3658
Comments
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! |
@Jay2113 are you able to give any indication whether there are any plans to implement access to the original |
bump |
Any news on this, please? we're about to migrate to Amplify and this seems to be an obstacle for us to move, is there any ETA please? or some workaround for now? @Jay2113 any tips/tricks here please? |
Same issue here. |
Same issue, seems AWS amplify team has selective blindness. |
This is very important to us too. We too need to have access to the user agent. Someone please respond and let us know when this issue will be resolved. |
I got the same issue, SSR on vercel is too slow, Amplify is better but got this problem, i don't know why a problem was affected to many developer that AWS does not resolve it |
CloudFront implemented a solution for this a couple of years ago to control origin request headers so CloudFront can forward on the user-agent header without it being part of the CloudFront cache key: https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/controlling-origin-requests.html I don't understand why Amplify won't give us this option, or even just expose the CloudFront distribution that Amplify creates behind-the-scenes so we can edit the settings in CloudFront. |
bump |
can this be used as a workaround? it would imply extra costs, right? |
@Jay2113 any plans on this please? |
bump |
bump! |
we have to set custom-user-agent for integrate with another solution |
any update here ? we are unable to find user device user-agent on server side, it shows cloudfront |
@fabio-carvalho88 I don't think it's something we can do without a technical change from AWS. My understanding is each AWS Amplify instance is packaged with a hidden instance of Cloudfront, and we do not have access to change any of its settings. |
yup, that's what I think as well... :/ |
in my case , i migrate from amplify to sstv2 because of this reason |
@hidon84 whats sstv2 ? |
I'm having the same issue, I'm thinking of migrating to Google Cloud Run because of this. My app depends on the user agent to detect what link to serve to the user, what features are available and how to communicate to the device. Also, this project has not been actively worked in months, I'm afraid it might be abandoned. Are there any other alternatives we can use with AWS or should I just move out? |
it use opennext , and work perfectly in my use case. |
bump |
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/ |
This issue is now closed. Comments on closed issues are hard for our team to see. |
This issue has been automatically locked. |
Before opening, please confirm:
App Id
d3qizoh4juhaxq
AWS Region
eu-west-2
Amplify Hosting feature
Frontend builds
Frontend framework
Next.js
Next.js version
13.4.16
Next.js router
App Router
Describe the bug
The request
user-agent
header always has a fixed value ofAmazon Cloudfront
when read in AWS Amplify apps.Like many apps, we rely on the
user-agent
header to customize the response and for statistical logging.Expected behavior
There appears to be no way to access the user's
user-agent
data from AWS Amplify. Either of the following solutions would be okay:user-agent
header and not replace it withAmazon Cloudfront
user-agent
header into a new custom request header e.g.origin-user-agent
that is accessible in AWS AmplifyWithout access to user agent information, we cannot use AWS Amplify to host our app.
Reproduction steps
user-agent
request header from the appBuild Settings
No response
Log output
Additional information
No response
The text was updated successfully, but these errors were encountered: