Caching for Error Pages

Sometimes clients will notice that their error pages are being cached. Say one of their files was missing from the origin, and they re-uploaded it, but CDN is still returning their 404 page until the cache is fully purged. The reason behind this is that the 404 page happened to have a Cache Control Header. In the example below, a 404 page with a CCH which will be cached. These bolded headers should not exist with error pages, otherwise NginX will cache the error page as if it is a valid page. Please make sure to unset/remove all headers on your 404/Error pages. Or if not possible, set a no-cache header as explained below, and as explained in this article.