mirror of
https://github.com/PretendoNetwork/account.git
synced 2026-10-02 07:08:23 -05:00
Added support for comma separated headers
This commit is contained in:
@@ -274,11 +274,11 @@ export function getValueFromHeaders(headers: IncomingHttpHeaders, key: string):
|
||||
let value: string | undefined;
|
||||
|
||||
if (header) {
|
||||
if (Array.isArray(header)) {
|
||||
header = header[0];
|
||||
if (!Array.isArray(header)) {
|
||||
header = header.split(', ');
|
||||
}
|
||||
|
||||
value = header;
|
||||
value = header[0];
|
||||
}
|
||||
|
||||
return value;
|
||||
|
||||
Reference in New Issue
Block a user