# What should be the AWS Cloudfront CDN Settings

**URL:** <https://forum.ghost.org/t/what-should-be-the-aws-cloudfront-cdn-settings/1820>\
**Category:** Installation\
**Created:** [July 2, 2018, 5:57pm UTC](https://forum.ghost.org/t/what-should-be-the-aws-cloudfront-cdn-settings/1820 "2018-07-02T17:57:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blane\_Townsend](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@Blane\_Townsend](https://forum.ghost.org/u/Blane_Townsend)\
**Post date:** [July 2, 2018, 5:57pm UTC](https://forum.ghost.org/t/what-should-be-the-aws-cloudfront-cdn-settings/1820/1 "2018-07-02T17:57:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![vikaspotluri123](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.ghost.org/vikaspotluri123/32/24_2.png) [@vikaspotluri123](https://forum.ghost.org/u/vikaspotluri123)\
**Post date:** [July 3, 2018, 3:17pm UTC](https://forum.ghost.org/t/what-should-be-the-aws-cloudfront-cdn-settings/1820/2 "2018-07-03T15:17:15Z")

</div>

I’m going to link to the docs in case the settings change - [this troubleshooting topic](https://docs.ghost.org/docs/troubleshooting#section-ghost-admin-not-loading) should point you in the right direction 😄

---

<div class="post-metadata">

**Author:** ![Blane\_Townsend](https://avatars.discourse-cdn.com/v4/letter/b/f05b48/32.png) [@Blane\_Townsend](https://forum.ghost.org/u/Blane_Townsend)\
**Post date:** [July 3, 2018, 4:30pm UTC](https://forum.ghost.org/t/what-should-be-the-aws-cloudfront-cdn-settings/1820/3 "2018-07-03T16:30:40Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/ghost2/original/2X/b/ba9ce5100b8bb264586f4f572545596b2ce3f081.png) [@system](https://forum.ghost.org/u/system)\
**Post date:** [July 17, 2018, 4:30pm UTC](https://forum.ghost.org/t/what-should-be-the-aws-cloudfront-cdn-settings/1820/4 "2018-07-17T16:30:46Z")

</div>

Closed on July 17, 2018, 4:30pm UTC

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