Repository navigation
fix(@angular-devkit/build-angular): preserve Host header when proxying in ssr-dev-server - #34261
Merged
Merged
Conversation
…g in ssr-dev-server Configure `browser-sync` with `changeOrigin: false` in `ssr-dev-server` so that the incoming `Host` header is preserved when proxying requests to the Node SSR server rather than being rewritten to `localhost`.
There was a problem hiding this comment.
Code Review
This pull request configures changeOrigin: false in the BrowserSync proxy options for the SSR dev server and adds a new test to verify that requests with a disallowed Host header are rejected with a 500 status code. Feedback on the test suggests wrapping the server execution in a try...finally block to guarantee that run.stop() is called even if assertions fail, preventing potential resource or port leaks.
…proxying in ssr-dev-server
dgp1130
approved these changes
Oct 6, 2026
Collaborator
Author
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.
Configure
browser-syncwithchangeOrigin: falseinssr-dev-serverso that the incomingHostheader is preserved when proxying requests to the Node SSR server rather than being rewritten tolocalhost.