If anyone else has this issue, I have released a middleware package that I am hoping will solve it. I've tested it locally but don't yet have a production-ready system to test it -actually- behind cloudfront, so if anyone does use it in a live environment before I do I'd love to get feedback. The package both pulls in the CloudFront IP's as well as rewrites the Cloudfront-Forwarded-Proto header to X-Forwarded-Proto, but only if Cloudfront-Forwarded-Proto header exists.
https://packagist.org/packages/jdavidbakr/cloudfront-proxies
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community