-
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
Add Cloudfront headers and prevent reverse proxy from stripping custom headers. #2459
Comments
This is still a thing. Ouch. They should allow the Cloudfront configs to be editable when using AWS Amplify. I'm running into this issue with GET requests being stripped of their headers when proxied through my AWS Amplify SPA. Guess I'll reach out to support to see what's possible. |
@mswezey23 So there's going to be a beta of the new build system at some point in the near future (it's been up in the air atm, check the Next 12 support thread under the hosting repo) and possibly maybe hopefully that might include a solution to the header issue. Definitely open a support ticket they can fix the header issue! Although quick note, I was denied last time I asked because they're looking for a better way to go about doing that (so I'm guessing the beta will.bave that feature) but if you have 1 app or something it's probably no big deal. |
I don't think they added cloudfront headers in the new releases but I'm gonna give it a try today and see. |
I have good news and bad news. There's one header |
@mswezey23 Did AWS Support ever offer you a solution to keep the original request headers? I'm deploying a React/Next.js app in AWS Amplify and need access to the |
This feature has just been supported with our latest launch! I'm closing this issue as it should be resolved now. 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. |
Is your feature request related to a problem? Please describe.
Currently, you can't add additional CloudFront headers easily to a deployment. To add them you have to modify the serverless config during the build process and the Amplify team has to give access to the stripped headers if you use a custom domain.
Current way to modify the serverless config
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-cloudfront-headers.html
Describe the solution you'd like
Ideally, a config option in the console would be nice. A dropdown similar to the Cloudfront behaviors dropdown would work.
The option to choose what is removed by the proxy would also be nice instead of having someone modify it. If someone plans to release 3 or 4 sites, they would need to contact the amplify team each time, therefore it would be easier to allow the users to modify it themselves per project.
The text was updated successfully, but these errors were encountered: