Restore MCP cross-origin protection after go-sdk v1.6.0 bump

The go-sdk v1.6.0 release no longer applies a default
CrossOriginProtection when the field is nil in StreamableHTTPOptions,
silently removing Origin header verification. Wrap the streamable
handler with http.NewCrossOriginProtection().Handler(...) (the
recommended replacement, since the SDK field is deprecated).

Also regenerate gqlgen resolvers to track v0.17.90.

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-05-05 14:46:04 +02:00
parent 6e5bbd713a
commit 88242eed87
46 changed files with 47 additions and 46 deletions

View File

@@ -68,10 +68,11 @@ func NewMux(logger *log.Logger, proboSvc *probo.Service, iamSvc *iam.Service, ac
Logger: nil, // TODO put logger here
},
)
protectedHandler := http.NewCrossOriginProtection().Handler(handler)
r := chi.NewMux()
r.Use(authn.NewAPIKeyMiddleware(iamSvc, tokenSecret))
r.Handle("/", RequireAPIKeyHandler(logger, handler))
r.Handle("/", RequireAPIKeyHandler(logger, protectedHandler))
logger.Info("MCP server initialized successfully")