Cache-Control: CloudFlare adds max TTL to 302 redirects if "Browser Cache TTL" is configured

If “Browser Cache TTL” is configured, CloudFlare always changes the cache control header of 302 redirects to the configured browser cache TTL, even if the origin explicitly specifies not to cache the page. Example:

Origin header:

Cache-Control: s-maxage=0, max-age=0, no-store

Header as modified by CloudFlare:

Cache-Control: max-age=31536000, s-maxage=0

This instructs the browser to cache the 302 redirect for one year, which we do not want.

What header option can we specify on the origin to prevent CloudFlare from adding max-age=TTL to 302 redirects?

Please note that we do want to keep the “Browser Cache TTL” of 1 year for everything except 302 redirects.

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