angular/packages/platform-server/test
Alan Agius 60552a73e8 fix(platform-server): add allowedHosts option to renderModule and renderApplication
In server-side rendering (SSR) setups, passing request URLs directly to the lower-level rendering APIs `renderModule` or `renderApplication` can expose applications to Server-Side Request Forgery (SSRF) or Host Header Injection attacks via absolute-form request URLs.
To mitigate these vulnerabilities at the framework layer, this commit introduces the `allowedHosts` option to `PlatformConfig` (supporting exact hostnames, wildcards like `*.example.com`, or `*` to allow all).

During platform initialization inside `createServerPlatform`, the hostname of the request `url` is validated against the `allowedHosts` list. If the hostname is not authorized, bootstrap immediately throws a host validation error, preventing unauthorized rendering and silent SSRF bypasses.

Closes #68436
2026-05-07 16:30:03 -06:00
..
BUILD.bazel build: consolidate domino bundling in platform-server 2026-03-25 13:31:05 -07:00
dom_utils.ts fix(core): Ensure application remains unstable during bootstrap (#62631) 2025-07-15 07:52:36 -07:00
event_replay_spec.ts fix(core): prevent event replay double-invocation when element hydrates before app stability 2026-04-27 17:07:36 -07:00
full_app_hydration_spec.ts fix(core): respect ngSkipHydration on components with projectable nodes in LContainers 2026-04-29 16:09:14 -07:00
hydration_utils.ts feat(core): introduce BootstrapContext for improved server bootstrapping (#63562) 2025-09-09 10:57:09 -07:00
incremental_hydration_spec.ts refactor(core): Makes @defer(hydrate ...) runtime tree-shakable 2026-05-01 15:54:55 -07:00
integration_spec.ts refactor(platform-server): split zone/zoneless tests. 2026-02-13 09:41:10 -08:00
platform_location_spec.ts fix(platform-server): ensure origin has a trailing slash when parsing url 2026-04-27 17:08:36 -07:00
render_spec.ts refactor: clean up explicit standalone flags from tests (#63963) 2025-09-22 14:27:34 +00:00
transfer_state_spec.ts fix(core): escape forward slashes in transfer state to prevent crawler indexing 2026-04-13 13:54:55 +03:00
utils_spec.ts fix(platform-server): add allowedHosts option to renderModule and renderApplication 2026-05-07 16:30:03 -06:00