adev/src/content/reference/errors/NG05703.md
This error occurs in Server-Side Rendering (SSR) environments when a URL resolution results in an unexpected origin change. This check is a security feature in @angular/platform-server designed to protect your application from Server-Side Request Forgery (SSRF) and security bypasses.
To perform HTTP requests and process route states during SSR, Angular must resolve relative URLs to absolute URLs.
During this resolution process, Angular validates that the resolved URL does not unexpectedly point to an external or untrusted origin. If a URL behaves like a relative path but resolves to a different origin, Angular throws NG05703 and blocks the request/navigation.
/\\attacker.com/path or \\\\attacker.com/path) can be interpreted differently by browsers and server-side URL parsers. In some parser implementations, these resolve to an absolute URL pointing to attacker.com. Angular detects this mismatch and blocks the resolution.location.replaceState or location.pushState) that change the origin of the application when the environment is configured to restrict URL changes to the current origin only.url passed to the renderer does not align with the base origin configured for the application (such as APP_BASE_HREF), the router might attempt to synchronize the location on startup, causing a disallowed origin change.ht\ntp://evil.com/path) that attempt to bypass origin checks.Check the URL that triggered the error. Ensure it does not contain unexpected backslashes, line breaks, or other characters that could trigger parsing anomalies:
\) in relative URLs or routing paths.url passed to the renderer matches the expected base origin/host (e.g. APP_BASE_HREF). Avoid using dynamic URLs from raw request headers (like X-Forwarded-Host) if they do not match the trusted application origin.//other-domain.com/path), ensure it is allowed by the configuration or use an explicit scheme (http:// or https://).