I am including the full response headers list below.
I have a single page rule, on url .valap.com/ with one setting: cache level as cache everything.
I do not have any worker. Brotli compression and auto minify are enabled.
The web site is cookie less.
What should I do to get them cached?
At the moment the received headers are:
HTTP/2 200 OK
date: Wed, 02 Dec 2020 15:07:50 GMT
content-type: text/css; charset=utf-8
last-modified: Wed, 02 Dec 2020 15:07:50 GMT
content-security-policy: frame-ancestors ‘self’;
strict-transport-security: max-age=31536000; includeSubDomains
expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
Additional information: the bundles are actually already minified, but by a somewhat old thing (the old .Net Framework System.Web.Optimization bundler). They are served by a quasi static IIS site using ARR to request the bundle from the actual .Net site, with some filtering to remove unwanted response headers.
My wild guess is try to add an Edge Cache TTL to that Page Rule. But I don’t see a reason for the BYPASS response. Unless there’s some Origin Cache-Control headers that Cloudflare is hiding. Those would show up in a direct ‘curl’ against the origin server.
Thanks sdayman, that was it, an offending header not shown through Cloudflare. I should have thought about querying directly the server and checking this.
Here are the headers when querying directly. I guess I have to blame that empty Set-Cookie.
HTTP/1.1 200 OK
Date: Thu, 03 Dec 2020 09:18:03 GMT
Content-Type: text/css; charset=utf-8
Last-Modified: Thu, 03 Dec 2020 09:16:53 GMT
Content-Security-Policy: frame-ancestors ‘self’;
Strict-Transport-Security: max-age=31536000; includeSubDomains
Yes. This was the culprit. Cloudflare will bypass cache for responses with cookies.
The origin server instructed Cloudflare to bypass cache via a Cache-Control header set to no-cache , private , or max-age=0 . BYPASS is returned when enabling Origin Cache-Control. Cloudflare also sets BYPASS when your origin web server sends cookies in the response header.