MCPcopy
hub / github.com/angular/angular / throwSuspiciousUrlError

Function throwSuspiciousUrlError

packages/platform-server/src/url.ts:120–127  ·  view source on GitHub ↗

* Throws a suspicious URL error indicating a security bypass attempt.

(urlStr: string)

Source from the content-addressed store, hash-verified

118 * Throws a suspicious URL error indicating a security bypass attempt.
119 */
120function throwSuspiciousUrlError(urlStr: string): never {
121 throw new RuntimeError(
122 RuntimeErrorCode.SUSPICIOUS_URL_CHANGE_ORIGIN,
123 typeof ngDevMode === 'undefined' || ngDevMode
124 ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`
125 : urlStr,
126 );
127}
128
129/**
130 * Checks if the origin has changed in a safe way.

Callers 1

resolveUrlFunction · 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…