| 201 | } |
| 202 | |
| 203 | func (i *imlMcpController) GlobalHandleStreamHTTP(ctx *gin.Context) { |
| 204 | apikey := ctx.Request.Header.Get("Authorization") |
| 205 | apikey = strings.TrimPrefix(apikey, "Bearer ") |
| 206 | cfg := i.settingModule.Get(ctx) |
| 207 | req := ctx.Request.WithContext(utils.SetGatewayInvoke(ctx.Request.Context(), cfg.InvokeAddress)) |
| 208 | req = req.WithContext(utils.SetLabel(req.Context(), "apikey", apikey)) |
| 209 | i.openStreamableServer.ServeHTTP(ctx.Writer, req) |
| 210 | } |
| 211 | |
| 212 | func (i *imlMcpController) MCPHandle(ctx *gin.Context) { |
| 213 | cfg := i.settingModule.Get(ctx) |