MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / detectCDN

Function detectCDN

apps/api/src/controllers/tools.controller.ts:119–134  ·  view source on GitHub ↗
(headers: Headers)

Source from the content-addressed store, hash-verified

117}
118
119function detectCDN(headers: Headers): string | null {
120 const server = headers.get('server')?.toLowerCase() || '';
121 const cfRay = headers.get('cf-ray');
122 const vercelId = headers.get('x-vercel-id');
123 const fastly = headers.get('fastly-request-id');
124 const cloudfront = headers.get('x-amz-cf-id');
125
126 if (cfRay || server.includes('cloudflare')) return 'Cloudflare';
127 if (vercelId || server.includes('vercel')) return 'Vercel';
128 if (fastly || server.includes('fastly')) return 'Fastly';
129 if (cloudfront || server.includes('cloudfront')) return 'CloudFront';
130 if (server.includes('nginx')) return 'Nginx';
131 if (server.includes('apache')) return 'Apache';
132
133 return null;
134}
135
136async function checkRobotsTxt(
137 baseUrl: string,

Callers 1

siteCheckerFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected