MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / deleteAllAdvScans

Function deleteAllAdvScans

web/scripts/ragnar_modern.js:19322–19341  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19320 }
19321
19322 return `${url.pathname}${url.search}${url.hash}`;
19323 } catch (error) {
19324 if (!likelyApiPath) {
19325 return endpoint;
19326 }
19327
19328 console.warn('Unable to normalize endpoint for network context', endpoint, error);
19329 const hasQuery = trimmed.includes('?');
19330 const alreadyHasParam = trimmed.includes(`${NETWORK_CONTEXT_PARAM}=`);
19331
19332 if (alreadyHasParam) {
19333 return endpoint;
19334 }
19335
19336 const separator = hasQuery ? '&' : '?';
19337 return `${trimmed}${separator}${NETWORK_CONTEXT_PARAM}=${encodeURIComponent(network)}`;
19338 }
19339}
19340
19341function networkAwareFetch(endpoint, options = {}) {
19342 const resolvedEndpoint = resolveNetworkAwareEndpoint(endpoint);
19343 return fetch(resolvedEndpoint, options);
19344}

Callers

nothing calls this directly

Calls 3

errorMethod · 0.80
showNotificationFunction · 0.70
refreshAdvVulnDataFunction · 0.70

Tested by

no test coverage detected