* Throws a suspicious URL error indicating a security bypass attempt.
(urlStr: string)
| 126 | * Throws a suspicious URL error indicating a security bypass attempt. |
| 127 | */ |
| 128 | function 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. |