Hello
I am trying to integrate AWS Cloudfront to my website, which runs mod_pagespeed.
When I access the website through Cloudfront, I get a unoptimized version (X-Mod-Pagespeed is not present). If I bypass Cloudfront and access the origin directly, I get the optimized version of my website (X-Mod-Pagespeed is there).
By default, Cloudfront "edits" (changes the value of some, deletes others) the request headers before sending it back to the origin. I suspected that this was preventing mod_pagespeed from working properly. So I went to Cloudfront and made it stop editing the headers (using the Behavior feature). After that, I started getting the optimized version from Cloudfront.
So, my conclusion is that mod_pagespeed needs some headers to work properly. My question is: what headers?
I am asking that because when you instruct Cloudfront to send headers to the origin it starts using the headers as part of the key for the cache. So, ideally, you should use as few headers as possible.
Thank you.
Fernando.