MCPcopy Create free account
hub / github.com/angular/angular / verifyMappedOrigin

Function verifyMappedOrigin

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

Source from the content-addressed store, hash-verified

561}
562
563function verifyMappedOrigin(url: string): void {
564 if (new URL(url, 'resolve://').pathname !== '/') {
565 throw new RuntimeError(
566 RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH,
567 'Angular detected a URL with a path segment in the value provided for the ' +
568 `\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\` token: ${url}. The map should only contain origins ` +
569 'without any other segments.',
570 );
571 }
572}
573
574/**
575 * 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