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

Function throwSuspiciousUrlError

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

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

(urlStr: string)

Source from the content-addressed store, hash-verified

152 * Throws a suspicious URL error indicating a security bypass attempt.
153 */
154function throwSuspiciousUrlError(urlStr: string): never {
155 throw new RuntimeError(
156 RuntimeErrorCode.SUSPICIOUS_URL_CHANGE_ORIGIN,
157 typeof ngDevMode === 'undefined' || ngDevMode
158 ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`
159 : urlStr,
160 );
161}
162
163/**
164 * 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