MCPcopy Index your code
hub / github.com/angular/angular / verifyMappedOrigin

Function verifyMappedOrigin

packages/common/http/src/transfer_cache.ts:531–540  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

529}
530
531function verifyMappedOrigin(url: string): void {
532 if (new URL(url, 'resolve://').pathname !== '/') {
533 throw new RuntimeError(
534 RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH,
535 'Angular detected a URL with a path segment in the value provided for the ' +
536 `\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\` token: ${url}. The map should only contain origins ` +
537 'without any other segments.',
538 );
539 }
540}
541
542/**
543 * SHA-256 Constants (first 32 bits of the fractional parts of the cube roots of the first 64 primes 2..311):

Callers 1

mapRequestOriginUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…