mirror of
https://github.com/YFGaia/dify-plus.git
synced 2026-06-14 20:41:21 +08:00
fix: 修改管理端的请求api端的CSRF逻辑:
需要 x-csrf-token header 需要 csrf_token cookie 两者必须一致,且是有效的JWT(包含 exp 和 sub=user_id)
This commit is contained in:
@@ -514,7 +514,15 @@ func generateCSVFromTasks(flow *gaia.BatchWorkflow, tasks []gaia.BatchWorkflowTa
|
||||
if key == "task_id" {
|
||||
continue
|
||||
}
|
||||
text += fmt.Sprintf("%s\r", v)
|
||||
switch vv := v.(type) {
|
||||
case string:
|
||||
text += fmt.Sprintf("%s\r", vv)
|
||||
case float64:
|
||||
text += fmt.Sprintf("%s\r", strconv.FormatFloat(vv, 'f', -1, 64))
|
||||
case int64:
|
||||
text += fmt.Sprintf("%d\r", vv)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
row = append(row, text)
|
||||
|
||||
Reference in New Issue
Block a user