I have a (mostly) complete template for on-the-fly image manipulation, where when the client hits the Cloudfront endpoint generated by the attached template, and depending on the alias provided they are either given a mobile-friendly or desktop-friendly version of an image from my unresized S3 image bucket.
I need a few things done with this template:
-Not certain the /mobile and /desktop endpoints are configured correctly. I want these to work.
-I also want security advice, particularly on preventing this from being used outside of my domain. I suspect this can be handled with CORS policies, however if there are other ways to lock this down I would like to know.
-Finally, besides the image caching of the resized image in Cloudfront that this template already does, I want the resized image to be stored in a given mobile or desktop S3 bucket for later use and in case I switch to a different strategy.
I will be looking for you to provide the updated template and the pseudo endpoint I would hit for the /mobile and /desktop cases.