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

Function throwProtocolRelativeUrlError

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

* Throws a protocol-relative URL error indicating that protocol-relative URLs are not allowed.

(urlStr: string)

Source from the content-addressed store, hash-verified

140 * Throws a protocol-relative URL error indicating that protocol-relative URLs are not allowed.
141 */
142function throwProtocolRelativeUrlError(urlStr: string): never {
143 throw new RuntimeError(
144 RuntimeErrorCode.PROTOCOL_RELATIVE_URL_NOT_ALLOWED,
145 typeof ngDevMode === 'undefined' || ngDevMode
146 ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}`
147 : urlStr,
148 );
149}
150
151/**
152 * Throws a suspicious URL error indicating a security bypass attempt.

Callers 1

resolveUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected