Strict-transport-security AND cache-control max-age NOT Matching

Hello all,

I’m a beginner with CDNs, but I had my Cloudflare cache working well as it was showing HIT status.

However, I upgraded to HSTS and now my Cloudflare is no longer caching my site correctly.
My Header Shows that the cache-control max-age=0 (it used to match before switching to HSTS) and my strict-transport-security max-age=31536000.

Any ideas as to why upgrading to HSTS would cause this issue or how I can fix it?

Thanks so much for any help! My Request Header is below for additional info:

  1. Request URL:
  1. Request Method:

GET

  1. Status Code:

200

  1. Remote Address:

  1. Referrer Policy:

strict-origin-when-cross-origin

  1. Response Headers

  2. cache-control:

max-age=0

  1. cf-cache-status:

MISS

  1. cf-ray:

6c0a5737ee3e5fd4-SEA

  1. content-encoding:

gzip

  1. content-type:

text/html; charset=UTF-8

  1. date:

Mon, 20 Dec 2021 16:45:22 GMT

  1. expect-ct:

max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct

  1. expires:

Mon, 20 Dec 2021 16:45:22 GMT

  1. host-header:

c2hhcmVkLmJsdWVob3N0LmNvbQ==

  1. last-modified:

Mon, 20 Dec 2021 15:14:57 GMT

  1. server:

cloudflare

  1. strict-transport-security:

max-age=31536000; includeSubDomains; preload

  1. vary:

Accept-Encoding,Cookie,User-Agent

I don’t know where you got that output, but I bet the Request you sent was a no-cache, like browser Dev Tools often do. Also, I’m not surprised that you’re surprised that HSTS could cause this, because it can’t.

I ran the command a second time and got a HIT (too lazy to take a second screenshot).

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