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

Function throwSuspiciousUrlError

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

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

(urlStr: string)

Source from the content-addressed store, hash-verified

126 * Throws a suspicious URL error indicating a security bypass attempt.
127 */
128function throwSuspiciousUrlError(urlStr: string): never {
129 throw new RuntimeError(
130 RuntimeErrorCode.SUSPICIOUS_URL_CHANGE_ORIGIN,
131 typeof ngDevMode === 'undefined' || ngDevMode
132 ? `URL ${urlStr} changed origin unexpectedly. This is suspicious and may indicate a security bypass attempt.`
133 : urlStr,
134 );
135}
136
137/**
138 * 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