What should be the AWS Cloudfront CDN Settings

I have Ghost setup on a docker container inside EC2. I then have a Cloudfront distribution in front of it to try to get the benefits of a Content Delivery Network. If I disable all caching by turning the setting ‘Cache Based on Selected Request Headers’ to ‘All’ then everything works and I can access the website Admin portal but there is no caching. If I set this parameter to ‘None’ then I get caching, but the Admin portal won’t work. There is another option to set that parameter to ‘Whitelist’, but I don’t know what headers I am supposed to whitelist. Does anybody know how to get this to work. Even if you use Cloudflare or some other CDN what headers are you supposed to whitelist for Ghost?

I’m going to link to the docs in case the settings change - this troubleshooting topic should point you in the right direction :smile:

Ah I see, you turn the cache on for the whole site, but anything with the path /ghost* (since that is the admin portal) you turn the cache off. Makes sense. Thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.