Skip to content

Conversation

@JamesNK
Copy link
Member

@JamesNK JamesNK commented Oct 31, 2025

Description

Fix dashboard configuration error when MCP endpoint is the only non-HTTPS endpoint.

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No
  • Does the change require an update in our Aspire docs?

@github-actions
Copy link
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 12556

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 12556"

@JamesNK JamesNK enabled auto-merge (squash) October 31, 2025 09:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for MCP (Model Context Protocol) endpoint to work with HTTP-only configuration, ensuring that HTTPS redirection is only enabled when all endpoints (Frontend, OTLP gRPC, OTLP HTTP, and MCP) are using HTTPS.

Key changes:

  • Updated the isAllHttps check to include the MCP endpoint when determining whether to enable HTTPS redirection
  • Added a test to verify that the MCP endpoint works correctly when configured with HTTP while other endpoints use HTTPS
  • Introduced a local variable to improve code readability when iterating over grouped endpoints

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Aspire.Dashboard/DashboardWebApplication.cs Added MCP endpoint to the HTTPS check and extracted grouped endpoints to a local variable
tests/Aspire.Dashboard.Tests/Integration/McpServiceTests.cs Added test case to verify MCP endpoint works with HTTP-only configuration

@JamesNK JamesNK merged commit 6a3a7ac into main Oct 31, 2025
302 of 303 checks passed
@JamesNK JamesNK deleted the jamesnk/mcp-https-fix branch October 31, 2025 09:43
@dotnet-policy-service dotnet-policy-service bot added this to the 13.0 milestone Oct 31, 2025
@JamesNK
Copy link
Member Author

JamesNK commented Oct 31, 2025

/backport to release/13.0

@github-actions
Copy link
Contributor

Started backporting to release/13.0: https://github.com/dotnet/aspire/actions/runs/18969710303

@github-actions github-actions bot locked and limited conversation to collaborators Dec 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants