mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[PR #21338] [CLOSED] fix: preserve trailing slash in MCP server URLs #41665
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/21338
Author: @shtse8
Created: 2/12/2026
Status: ❌ Closed
Base:
main← Head:fix/mcp-preserve-trailing-slash📝 Commits (1)
98b8290fix: preserve trailing slash in MCP server URLs📊 Changes
1 file changed (+4 additions, -2 deletions)
View changed files
📝
src/lib/components/AddToolServerModal.svelte(+4 -2)📄 Description
Summary
When configuring tool servers via the web UI, trailing slashes are stripped from all URLs—including MCP servers. For MCP servers, the trailing slash can be significant: some servers (e.g., Bitrix24) require a specific path format, and removing the slash causes a 301 redirect that loses authentication headers, resulting in a 400 Bad Request error.
Changes
Only strip trailing slashes for
openapitype tool servers (where path construction appends specific endpoints like/openapi.json). MCP server URLs are used as-is by the MCP client and should preserve the user's exact input.Before
After
Fixes #21179
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.