fix(@angular/ssr): add support for configuring trusted proxy headers via environment variable#33056
Merged
alan-agius4 merged 1 commit intoangular:mainfrom Apr 28, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request adds support for the NG_TRUSTED_PROXY_HEADERS environment variable and refactors environment variable parsing into a reusable helper function. A review comment recommends renaming a variable in the helper function to improve clarity given its now generic usage.
a5fb7ba to
4a3e6d1
Compare
947597b to
d7fb4a5
Compare
alan-agius4
added a commit
to alan-agius4/angular
that referenced
this pull request
Apr 27, 2026
…rNodeAppEngine See: angular/angular-cli#33056 for more info.
…via environment variable Adds support for configuring trusted proxy headers via the `NG_TRUST_PROXY_HEADERS` environment variable in `AngularNodeAppEngine`. This allows users to specify which proxy headers (such as `X-Forwarded-Host`) should be trusted when running the server-side application behind a reverse proxy, without needing to modify the application code. The environment variable accepts a comma-separated list of header names. If the `NG_TRUST_PROXY_HEADERS` environment variable is set and contains non-empty values, it will take precedence over the `trustProxyHeaders` option provided programmatically in the `AngularNodeAppEngine` constructor options.
d7fb4a5 to
23c0980
Compare
hawkgs
reviewed
Apr 27, 2026
alan-agius4
added a commit
to alan-agius4/angular
that referenced
this pull request
Apr 27, 2026
…rNodeAppEngine See: angular/angular-cli#33056 for more info.
dgp1130
approved these changes
Apr 27, 2026
Collaborator
Author
amishne
pushed a commit
to angular/angular
that referenced
this pull request
Apr 28, 2026
…rNodeAppEngine See: angular/angular-cli#33056 for more info.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds support for configuring trusted proxy headers via the
NG_TRUST_PROXY_HEADERSenvironment variable inAngularNodeAppEngine.This allows users to specify which proxy headers (such as
X-Forwarded-Host) should be trusted when running the server-side application behind a reverse proxy, without needing to modify the application code. The environment variable accepts a comma-separated list of header names.If the
NG_TRUST_PROXY_HEADERSenvironment variable is set and contains non-empty values, it will take precedence over thetrustProxyHeadersoption provided programmatically in theAngularNodeAppEngineconstructor options.