use PDA token for evidence downloads
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user