-
Notifications
You must be signed in to change notification settings - Fork 10.4k
[release/9.0-rc2] [Blazor] Update WebAssembly.DevServer
to serve the Blazor-Environment
header
#57974
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wtgodbe
merged 3 commits into
release/9.0-rc2
from
backport/pr-57971-to-release/9.0-rc2
Sep 20, 2024
Merged
[release/9.0-rc2] [Blazor] Update WebAssembly.DevServer
to serve the Blazor-Environment
header
#57974
wtgodbe
merged 3 commits into
release/9.0-rc2
from
backport/pr-57971-to-release/9.0-rc2
Sep 20, 2024
Conversation
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
mkArtakMSFT
approved these changes
Sep 19, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MackinnonBuck !
This was referenced Sep 20, 2024
Test failure unrelated |
This was referenced Jul 22, 2025
Closed
chore: Bump Microsoft.AspNetCore.Components.WebAssembly.DevServer and 6 others
Markinatorina/MSAVA#7
Merged
This was referenced Aug 8, 2025
This was referenced Aug 15, 2025
Open
Open
This was referenced Aug 25, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Backport of #57971 to release/9.0-rc2
/cc @MackinnonBuck
[Blazor] Update
WebAssembly.DevServer
to serve theBlazor-Environment
headerFixes a recent regression that caused Blazor WebAssembly Standalone apps to always interpret the ASP.NET Core environment as "Production" during development.
Description
Blazor WebAssembly apps determine the ASP.NET Core environment by reading the
Blazor-Environment
header in the response for the boot manifest (blazor.boot.json
). A recent change caused the WebAssembly development server to stop serving this header, which resulted inIWebAssemblyHostEnvironment.Environment
always returning"Production"
. This PR fixes the issue by updating the development server to correctly serve the header.Fixes #57941
Customer Impact
Without this fix, customers relying on
IWebAssemblyHostEnvironment
to selectively enable features based on the environment will experience problems during development. They will need to find another solution to determine whether the app is running in a development environment.Regression?
Regressed in .NET 9 Preview 6
Risk
The fix is straightforward, and automated tests now validate the expected behavior.
Verification
Packaging changes reviewed?