mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Let modifyNpmInfoRequestHeaders return the header collection as well.
This commit is contained in:
parent
5834229427
commit
44ee58aa9b
3 changed files with 18 additions and 10 deletions
|
|
@ -8,6 +8,7 @@ const state = {
|
|||
|
||||
/**
|
||||
* @param {NodeJS.Dict<string | string[]>} headers
|
||||
* @returns {NodeJS.Dict<string | string[]>}
|
||||
*/
|
||||
export function modifyNpmInfoRequestHeaders(headers) {
|
||||
const accept = getHeaderValueAsString(headers, "accept");
|
||||
|
|
@ -17,6 +18,7 @@ export function modifyNpmInfoRequestHeaders(headers) {
|
|||
// Force the registry to return the full metadata by changing the Accept header.
|
||||
headers["accept"] = "application/json";
|
||||
}
|
||||
return headers;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue