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