Hi,
New to Cloudflare, so, I (know I) might be doing something wrong.
I have an API serving json via an IP address - no domain/sub-domain setup (yet). It is also serving on the 2095 port.
This is an example of the request: http://{IP Address}:2095/api/something/?query=john&limit=3&fmt=json
The response is plain json.
I have added an A Type DNS entry to Cloudflare with a name of search and Content with the IP address of the API server above. This is being proxied.
When I hit http://search.{domain name}.com:2095/api/something/?query=john&limit=3&fmt=json I get the exact same response as when I hit it via http://{IP Address}:2095/api/something/?query=john&limit=3&fmt=json
The same happens if I switch “Proxied” to “DNS Only” in Cloudflare.
As this was working in terms of content I thought I had it all in place but when I go to the Analytics page on Cloudflare I can see no Cached Requests were served - only Uncached.
I presume this means Cloudflare is not caching (and so, not serving cached) content.
I added Page Rules for search.{domain name}.com:2095/api/?*fmt=json with a few settings combinations but now with the following:
Browser Cache TTL - 30 minutes
Cache Level - Cache Everything
Edge Cache TTL - 2 hours
What am I missing?
Thank you in advance to anyone spending time to help.