forked from external-repos/pa11y-dashboard
Parse task headers as HTTP headers rather than JSON
This commit is contained in:

committed by
Rowan Manning

parent
ee729d1d55
commit
568e068613
@@ -35,6 +35,13 @@ function presentTask(task) {
|
||||
// Enhance the ignored rules
|
||||
task.ignore = presentIgnoreRules(task.ignore);
|
||||
|
||||
// Change headers to a string format
|
||||
if (task.headers && typeof task.headers === 'object') {
|
||||
task.headers = Object.keys(task.headers).map(header => {
|
||||
return `${header}: ${task.headers[header]}`;
|
||||
}).join('\n');
|
||||
}
|
||||
|
||||
// Present the last result if present
|
||||
if (task.last_result) {
|
||||
task.lastResult = presentResult(task.last_result);
|
||||
|
Reference in New Issue
Block a user