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

Function verifyMappedOrigin

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

Source from the content-addressed store, hash-verified

532}
533
534function verifyMappedOrigin(url: string): void {
535 if (new URL(url, 'resolve://').pathname !== '/') {
536 throw new RuntimeError(
537 RuntimeErrorCode.HTTP_ORIGIN_MAP_CONTAINS_PATH,
538 'Angular detected a URL with a path segment in the value provided for the ' +
539 `\`HTTP_TRANSFER_CACHE_ORIGIN_MAP\` token: ${url}. The map should only contain origins ` +
540 'without any other segments.',
541 );
542 }
543}
544
545/**
546 * 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