Skip to content

Commit 81f37e4

Browse files
committed
Improve Akamai CDN detection via server header
Many Akamai-served sites expose 'server: AkamaiGHost' or 'server: AkamaiNetStorage' but not the x-akamai-request-id header. Added fallback detection that checks the server header for "akamai" to improve detection on sites like fedex.com and adobe.com.
1 parent a89d748 commit 81f37e4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CF Cache Status/CF Cache Status Extension/Resources/background.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ function detectCDN(headers) {
7272
if (headers['cdn-cache'] || headers['cdn-pullzone']) return 'bunny';
7373
if (headers['x-varnish']) return 'varnish';
7474

75+
// Check server header for CDN hints
76+
const server = (headers['server'] || '').toLowerCase();
77+
if (server.includes('akamai')) return 'akamai';
78+
7579
// Check x-cache with via header for additional hints
7680
if (headers['x-cache']) {
7781
const via = (headers['via'] || '').toLowerCase();

0 commit comments

Comments
 (0)