angular/integration/platform-server
Alan Agius 8569db8875
Some checks failed
DevInfra / assistant_to_the_branch_manager (push) Has been cancelled
CI (push) / lint (push) Has been cancelled
CI (push) / devtools (push) Has been cancelled
CI (push) / test (push) Has been cancelled
CI (push) / integration-tests (push) Has been cancelled
CI (push) / adev (push) Has been cancelled
CI (push) / publish-snapshots (push) Has been cancelled
CI (push) / zone-js (push) Has been cancelled
Update ADEV Angular CDK APIs and CLI Help / Update Angular CDK APIs and CLI Help (if necessary) (push) Has been cancelled
CI (push) / adev-deploy (push) Has been cancelled
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:48 -06:00
..
e2e test: add integration test for defer with input on SSR with zones (#61056) 2025-04-30 12:02:03 -07:00
projects fix(platform-server): add allowedHosts option to renderModule and renderApplication 2026-05-07 16:30:48 -06:00
.editorconfig test: update platform-server integration tests to use the Angular CLI (#49900) 2023-04-18 19:47:02 +00:00
.gitignore test: update platform-server integration tests to use the Angular CLI (#49900) 2023-04-18 19:47:02 +00:00
angular.json test: update protractor builder usage to private-protractor (#58254) 2024-10-22 07:37:14 -07:00
BUILD.bazel build: trigger error when size-tracking is enabled but not in limit file (#55708) 2024-05-07 13:39:56 -07:00
package.json refactor(core): drop unused deps for integration apps (#60594) (#60643) 2025-03-31 17:55:39 +00:00
README.md test: update platform-server integration tests to use the Angular CLI (#49900) 2023-04-18 19:47:02 +00:00
tsconfig.json test: refactor platform-server integration tests to use application builder (#53205) 2023-11-28 11:07:01 +01:00
yarn.lock build: update lock files for integration test apps (#60594) (#60643) 2025-03-31 17:55:39 +00:00

PlatformServer

This project was generated with Angular CLI version 16.0.0-rc.0.

Development server

Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.

Code scaffolding

Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.

Build

Run ng build to build the project. The build artifacts will be stored in the dist/ directory.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.