I am attempting to utilize the browser canvas feature to manipulate images that are hosted on cloudfront. My goal is to configure cloudfront in a way that allows the browser to cache images with cache control set to max-age, while still enabling canvas editing of those images.
Here's an image that I can successfully edit:
Link to editable image
However, here's one that I cannot edit (due to Cross-Origin Resource Sharing policy restrictions):
Link to blocked image
The only difference seems to be the cache-controls header. Any ideas on what might be causing this issue? Thank you.
I am utilizing the node.js knox library for uploading. Here is an example of the headers being used:
var headers = {
'Content-Length': options.data.length,
'Vary': 'Accept-Encoding',
// 'Cache-Control': 'public, max-age=31536000',
'x-amz-acl': 'public-read',
'Content-Type': options.type
}