mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Apply suggestion from @bitterpanda63
Adds comment about "utf8" encoding of json response. Co-authored-by: bitterpanda <bitterpanda@proton.me>
This commit is contained in:
parent
f7de81645c
commit
e02e36cfea
1 changed files with 1 additions and 0 deletions
|
|
@ -53,6 +53,7 @@ export function modifyNpmInfoResponse(body, headers) {
|
||||||
return body;
|
return body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// utf-8 is default encoding for JSON, so we don't check if charset is defined in content-type header
|
||||||
const bodyContent = body.toString("utf8");
|
const bodyContent = body.toString("utf8");
|
||||||
const bodyJson = JSON.parse(bodyContent);
|
const bodyJson = JSON.parse(bodyContent);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue