feat(workflow): 支持运行中执行事件中枢与优雅关停

This commit is contained in:
2026-08-26 14:52:15 +08:00
parent e0f7ce61a1
commit 5c5f97af17
17 changed files with 747 additions and 514 deletions
@@ -150,6 +150,14 @@ func HttpCallResultLambda(ctx context.Context, nodeInput *flowDto.NodeExecutionI
}
}
}
// 后台恢复续跑无 HTTP 请求时(ctx 携带合成 user、无 token),补充 X-User-Info 供下游内部服务
// GetUserInfo 识别租户;正常执行 ctx 无 user(仅 request 有 Authorization),不会注入,
// 避免把内部身份透传给任意外部 URL。与 gateway/model.go requestHeaders 的恢复兜底保持一致
if headers["X-User-Info"] == "" {
if u := ctx.Value("user"); u != nil {
headers["X-User-Info"] = gconv.String(u)
}
}
}
g.Log().Debugf(ctx, "httpCallResultLambda: body: %v", body)