News for hackers. Stuff that matters.
Re:You don't need that CORS request by Cthulhu_ on Monday January 03, 2022 @03:36AM (#29778600)
CloudFront is a CDN, it should cache static resources, not so much manipulate incoming requests - that's more a job for a load balancer / proxy like Elastic Load Balancer.
Re:You don't need that CORS request by Tea418 on Monday January 03, 2022 @06:12AM (#29779588)
Fully agree here: I don’t expect anything else but reliable and performant HTTP caching from a CDN like CloudFront.

Request manipulation is not the duty of a cache - even though other CDN providers mix request manipulation functionality with caching. In my opinion, they don’t need to be in the same product.

If you still need request manipulation, because you don’t control the origin or you don’t want to introduce another service between CloudFront and the origin, you would use CloudFront Functions, which is cheaper than Lambda@Edge and easy to set up.

Re:You don't need that CORS request by herpderperator on Monday January 03, 2022 @12:55PM (#29783810)
CloudFront Distributions cannot pass the request to CloudFront Functions before sending to the origin. In other words, they cannot be used to modify origin request/responses. They can only modify the viewer request/responses. [0]

Only Lambda@Edge can help the scenario which I provided, which is also AWS's recommended solution. [1]

[0] https://docs.aws.amazon.com/AmazonCloudFront/latest/Develope...

[1] https://aws.amazon.com/blogs/architecture/serving-content-us...

Re:You don't need that CORS request by youngtaff on Monday January 03, 2022 @05:43AM (#29779384)
CloudFront is CDN with limited features, other CDNs (Akamai, Fastly etc) are more than capable of manipulating incoming requests
Re:You don't need that CORS request by antihero on Monday January 03, 2022 @09:42AM (#29781217)
Which is why CloudFront and Lambda are separate products. Lambda@Edge simply combines them.