mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-07-20 18:51:00 +02:00
fix wrong api test request header text
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -301,10 +301,11 @@
|
||||
if (!headers) {
|
||||
return '';
|
||||
}
|
||||
// if headers are a malformed array, we use a hack
|
||||
if (headers[0]) {
|
||||
headers = headers[0];
|
||||
// if headers is an array of {key, value} objects
|
||||
if (Array.isArray(headers)) {
|
||||
return headers.map((header) => `${header.key}: ${header.value}`).join('\n');
|
||||
}
|
||||
// if headers is an object
|
||||
return Object.keys(headers)
|
||||
.map((key) => `${key}: ${headers[key]}`)
|
||||
.join('\n');
|
||||
|
||||
Reference in New Issue
Block a user