Repository navigation
Add Dashboard setting to disable Blazor WebSocket compression - #20633
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20633Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20633" |
Tests selector54 / 97 PR test projects · 5 PR jobs, from 4 changed files. Selected PR test projects (54 / 97)
Selected PR jobs (5)
How these were chosen — grouped by what changed
🔧 show 43
🔧 📦 affected project 📦 affected project 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Disabling compression removes existing frame-ancestor protection, and the endpoint behavior lacks regression coverage.
Review effort: Balanced
Findings: 1
Open (2)
What changed in this PR
Adds a dashboard setting to disable Blazor WebSocket compression for incompatible reverse proxies.
Changes:
- Binds and applies
DisableWebSocketCompression. - Documents the setting and environment-variable usage.
- Adds JSON configuration-binding tests.
| File | Description |
|---|---|
src/Aspire.Dashboard/Configuration/DashboardOptions.cs |
Defines the frontend option. |
src/Aspire.Dashboard/DashboardWebApplication.cs |
Applies it to Blazor. |
src/Aspire.Dashboard/README.md |
Documents the setting. |
src/Shared/DashboardConfigNames.cs |
Defines configuration names. |
tests/Aspire.Dashboard.Tests/DashboardOptionsTests.cs |
Tests JSON binding. |
|
Pull request created: #1820
|
|
📝 Documentation has been drafted in microsoft/aspire.dev#1820 targeting Documented the new Note This draft PR needs human review before merging. |


Description
The standalone Dashboard can fail to initialize behind IIS ARR when Blazor negotiates WebSocket compression. Users currently have to strip the WebSocket compression request header at the reverse proxy.
Add
Dashboard:Frontend:DisableWebSocketCompressionso users can disable Blazor WebSocket compression through JSON configuration or an environment variable instead. The option defaults tofalse, preserving the existing compression-enabled behavior. HTTP response compression for static assets is unaffected.The option is bound through the existing Dashboard configuration infrastructure and passed to Blazor's
AddInteractiveServerRenderModeoptions. This also documents the setting and adds JSON-binding tests for omitted, false, and true values. No new dependencies are required.Fixes #20598
User-facing usage
Set the environment variable:
Or provide JSON configuration:
{ "Dashboard": { "Frontend": { "DisableWebSocketCompression": true } } }Restart the Dashboard after changing this setting. Disabling compression increases WebSocket bandwidth usage.
Validation
.\restore.cmd- passed.git --no-pager diff --check- passed.Checklist
<remarks />and<code />elements on your triple slash comments?