CDN Functionality

Hi there,

Great tool! I’ve really enjoyed using it. I had a question about one part of the functionality though — how do you detect CDN use for a webpage and request?

I was taking a look at the code and it looks like you examine the header, but there is not “cdn” header, at least to my knowledge. How do you do that?

I’m curious and would appreciate the insight.

It has a list of known CDN domains (for cases where the domain is CNAME’d to a CDN) as well as a fallback to cdn-specific response headers: https://github.com/WPO-Foundation/webpagetest/blob/master/agent/wpthook/cdn.h