Menu

How to detect a CDN when your scanner runs on Cloudflare (the Server header won't tell you)
📰

How to detect a CDN when your scanner runs on Cloudflare (the Server header won't tell you)

DEV Community: webdev·Katia Belokon·19 days ago
#BKX6RUKg
#devtowebdev#devto#dev#cloudflare#server
Reading 0:00
15s threshold

My CDN detector said Cloudflare. Then Cloudflare. Then Cloudflare. Three sites, three identical answers, and the reason was not the sites: the detector trusted the Server header, and it was reading that header from inside Cloudflare.

TL;DR

The scanner runs on Cloudflare. From there, every site it fetched came back with server: cloudflare , so it reported Cloudflare on 3 sites out of 3.

curl from an ordinary machine shows something else: github.com answers Server: github.com , BBC answers Server: BBC-GTM .

Server is not a CDN field. To detect a CDN, use DNS (NS and CNAME) plus headers the CDN documents as its own, and count those headers only when you are not fetching from inside that CDN.

Three for three

I built MyIPScan, a site with free network and privacy checks. One of them takes a domain and reports what it can see from the outside: HTTPS, redirects, security headers, DNS, and a line called "CDN".

The scanner found Cloudflare on three sites out of three.

Cloudflare is big.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.