use PDA token for evidence downloads

This commit is contained in:
2026-09-23 18:50:06 +08:00
parent ed8efc9a35
commit 78bed591e0
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -671,7 +671,8 @@ export class AcceptanceRun {
}
async requestBinary(method, path) {
const headers = { Accept: '*/*', Authorization: `Bearer ${this.token}` }
const token = this.pdaToken && /\/pda-loading\/tasks\/\d+/.test(String(path)) ? this.pdaToken : this.token
const headers = { Accept: '*/*', ...(token ? { Authorization: `Bearer ${token}` } : {}) }
const maxAttempts = ['GET', 'HEAD'].includes(String(method).toUpperCase()) ? 3 : 1
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
try {