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

Function checkSitemap

apps/api/src/controllers/tools.controller.ts:179–197  ·  view source on GitHub ↗
(baseUrl: string)

Source from the content-addressed store, hash-verified

177}
178
179async function checkSitemap(baseUrl: string): Promise<boolean> {
180 try {
181 const sitemapUrl = new URL('/sitemap.xml', baseUrl).toString();
182 const controller = new AbortController();
183 const timeout = setTimeout(() => controller.abort(), 3000);
184
185 const response = await fetch(sitemapUrl, {
186 signal: controller.signal,
187 headers: {
188 'User-Agent': 'OpenPanel-SiteChecker/1.0',
189 },
190 });
191
192 clearTimeout(timeout);
193 return response.ok;
194 } catch {
195 return false;
196 }
197}
198
199async function getSSLInfo(
200 hostname: string,

Callers 1

siteCheckerFunction · 0.85

Calls 2

fetchFunction · 0.50
toStringMethod · 0.45

Tested by

no test coverage detected