Files
weichenandCursor d7a144de26 feat(taskrun): resume interrupted runs and harden P1 security gaps
Add confirm-gated resume API with resumable flag, Phase 5 finalize fault
and rolling-restart replay tests, Mermaid strict mode, request body limits,
and optional Runner Bearer auth between app and pi-agent.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:23 +00:00

14 lines
323 B
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package agent
import "net/http"
const runnerAuthHeader = "Authorization"
// ApplyRunnerAuth 为 Runner HTTP 请求附加 Bearer token(token 为空时不设置)。
func ApplyRunnerAuth(req *http.Request, token string) {
if req == nil || token == "" {
return
}
req.Header.Set(runnerAuthHeader, "Bearer "+token)
}