Get "CF-Cache-Status: HIT" while Authentication Header is set

Hi there, I’m looking to test out my Cloudflare setup, but am testing on a staging site. The site is protected using HTTP Auth. This seems to interfere with allowing CF to cache and serve static assets.

Is there documentation to circumvent this behavior?


Actually, @sandro - it’s an assumption. I’ve run out of other ideas on why it’s not caching. Thoughts?

Probably the easiest way to protect your test/dev environments is Cloudflare Access, and remove the Basic Auth config from your origin. This way you control cache in the normal way, and all users accessing the site need to authenticate.


Thanks @michael - that helped. :slight_smile:

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