Skip to content

Commit 2469181

Browse files
author
klapaudius
committed
Update routes to use dynamic default path
Replaced hardcoded paths in routing configuration with a dynamic path variable (`%klp_mcp_server.default_path%`). This enables greater flexibility in configuring route prefixes based on deployment settings.
1 parent 926f2e8 commit 2469181

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Resources/config/routes.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@
1111
* @return void
1212
*/
1313
return function (RoutingConfigurator $routes) {
14-
$routes->add('sse_route', '/mcp/sse')
14+
$defaultPath = "%klp_mcp_server.default_path%";
15+
16+
$routes->add('sse_route', "/$defaultPath/sse")
1517
->controller([SseController::class, 'handle'])
1618
->methods(['GET', 'POST']);
1719

18-
$routes->add('message_route', '/mcp/message')
20+
$routes->add('message_route', "/$defaultPath/message")
1921
->controller([MessageController::class, 'handle'])
2022
->methods(['POST']);
2123
};

0 commit comments

Comments
 (0)