Closed mcmanimie closed 11 months ago
It depends on how you identify your image or non image files. This can be done by creating CloudFront cache behaviours with different configurations. For example, keep the default cache behaviour as is for image transformations, and create a new cache behaviour catching .pdf extensions with a simple configuration pointing to the bucket containing pdf files.
Got it! So add my primary S3 bucket to the ImageTransformation distribution (which currently only has origins with the Lambda function and ImageTransformation bucket), create a catch behavior which filters out .pdf, and point to it?
yes thats an easy solution, let me know if it works
Boom! Easy peasy. Seems to work fine. If .pdf, right to the bucket, everything else routes to Lambda.
awesome
Can this be set up so that, in the event of a request for a non-image (.pdf for example), it simply grabs it from the bucket without attempting to optimize. As it stands I have a lot of scattered content in my primary bucket and my entire Wordpress instance, leveraging WP Offload Media, pulls through the same CDN address so when I request .pdf's and the like I get an Internal Server Error.