My Origin returns static images identified by “show” query string parameter as follows:
I’m trying to configure CF domain to always cache the following URL response:
Have configured Cache Everything with Edge Cache TTL rule but still getting cf-cache-status: DYNAMIC response header and according to the Origin server logs, every request does reach the origin.
The default Caching configuration is set to Standard.
What am I missing?
Update: looks like the problem is that CF doesn’t recognize URLs without file extensions but having a query string as a potentially static content.
So I’ve solved it in an ugly way by adding Transform Rewrite Rule which explicitly adds the actual script’s file with extension. Meaning rewrites /Download/? to /Download/DownloadFile.dll?
Hence the new question is if it’s possible to configure the rule without using URL rewrite?
Seems to work actually.
$ curl -I 'https://img.verisetapp.com/Download/?show=1_816E020F-FB21-4ABE-8D5B-BEA51C1926C4' | grep status cf-cache-status: HIT
On a related note, you might be in violation of 2.8 of the terms of service as you seem to be using Cloudflare for that domain only for images. If this is accurate, and depending on your traffic, Cloudflare may restrict or suspend your account.
As mentioned in the later update, it works because of a new rewrite rule, which is something that I would like to avoid ideally.
Re using only for images - we have just set up this new domain and are going to use it for API requests on another subdomain (api.verisetapp.com) very soon.
Hope this will get us un track regarding your terms of service?
Cloudflare is primarily intended for traditional websites, if you only serve media content and API request, you are still possibly in violation. A lot depends on the traffic, but I did want to let you know.
As for the page rule,
/* should be enough to enable caching. Right now it appears to work fine.
Thanks for raising the flag. We’ll review your terms more carefully.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.