Skip to content

Commit f260c5a

Browse files
shams858Shamsul Arefincrivetimihai
authored
fix: Update server ID regex to support hexadecimal UUIDs in virtual server paths (#599)
Signed-off-by: Shamsul Arefin <[email protected]> Co-authored-by: Shamsul Arefin <[email protected]> Co-authored-by: Mihai Criveti <[email protected]>
1 parent b51baba commit f260c5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mcpgateway/transports/streamablehttp_transport.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ async def handle_streamable_http(self, scope: Scope, receive: Receive, send: Sen
517517
"""
518518

519519
path = scope["modified_path"]
520-
match = re.search(r"/servers/(?P<server_id>[^/]+)/mcp", path)
520+
match = re.search(r"/servers/(?P<server_id>[a-fA-F0-9\-]+)/mcp", path)
521521

522522
if match:
523523
server_id = match.group("server_id")

0 commit comments

Comments
 (0)