fix: 修改管理端的请求api端的CSRF逻辑:

需要 x-csrf-token header
需要 csrf_token cookie
两者必须一致,且是有效的JWT(包含 exp 和 sub=user_id)
This commit is contained in:
npc0-hue
2026-01-22 15:30:36 +08:00
parent 9ed0d7c891
commit 7ba4db8888
23 changed files with 1016 additions and 354 deletions
+9 -1
View File
@@ -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)