We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc1d212 commit 32d9143Copy full SHA for 32d9143
http.go
@@ -120,7 +120,13 @@ func startHTTPServer(config *Config) error {
120
if len(clientConfig.Options.AuthTokens) > 0 {
121
middlewares = append(middlewares, newAuthMiddleware(clientConfig.Options.AuthTokens))
122
}
123
- mcpRoute := path.Join(baseURL.Path, name) + "/"
+ mcpRoute := path.Join(baseURL.Path, name)
124
+ if !strings.HasPrefix(mcpRoute, "/") {
125
+ mcpRoute = "/" + mcpRoute
126
+ }
127
+ if !strings.HasSuffix(mcpRoute, "/") {
128
+ mcpRoute += "/"
129
130
httpMux.Handle(mcpRoute, chainMiddleware(server.sseServer, middlewares...))
131
httpServer.RegisterOnShutdown(func() {
132
log.Printf("<%s> Shutting down", name)
0 commit comments