-
Notifications
You must be signed in to change notification settings - Fork 235
fix: root path(/) is forcibly occupied #334
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
Conversation
Make sure that the homepage is not forcibly occupied during the integration, keep custom(or default from .NET Core setting) homepage, `/sse` and `/message` urls under root url together.
…ility of the homepage
Fix homepage
…sic/transports#streamable-http streamable HTTP use /mcp, and retain the customization ability of the homepage
streamable HTTP use /mcp as default endpoint, and retain the customization ability of the homepage
The Why not call Is it that you don't want to route |
Yes, if you use app.MapMcp("/mcp"), you have to use |
You can already get that behavior by calling Is it that you want to be able to use |
No, I want |
I think we can look into new options we can add to give more control over the SSE route or disabling either SSE or Streamable HTTP, but I don't think we'll be adding Fortunately, as far as wanting to route app.MapMcp("/mcp");
app.MapMcp("/").WithOrder(1); // The higher the order, the lower the priority.
app.MapGet("/", () => "Hello World!"); // Preferred with default order 0. This could be app.MapRazorPages(); instead. |
Motivation and Context
We have to make sure that the homepage is not forcibly occupied during the integration, keep custom(or default from .NET Core setting) homepage,
/sse
and/message
urls under root url together.How Has This Been Tested?
Set
occupyRootUrl
to false, then you can see default home page again for project.Breaking Changes
No. Default value for
occupyRootUrl
is true, the same to initial condition.Types of changes
Checklist
Additional context