mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 21:02:33 +03:00
Check for base64 encoding in netlify adapter.
This commit is contained in:
parent
4444ef6fc0
commit
f12b11ddb0
@ -230,7 +230,12 @@ function reqToJson(req, requestTime) {
|
|||||||
resolve(toJsonHelper(req, requestTime, fields));
|
resolve(toJsonHelper(req, requestTime, fields));
|
||||||
});
|
});
|
||||||
console.log('@@@4');
|
console.log('@@@4');
|
||||||
bb.write(req.body);
|
|
||||||
|
if (req.isBase64Encoded) {
|
||||||
|
bb.write(Buffer.from(req.body, 'base64').toString('utf8'));
|
||||||
|
} else {
|
||||||
|
bb.write(req.body);
|
||||||
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('@@@5', error);
|
console.error('@@@5', error);
|
||||||
resolve(toJsonHelper(req, requestTime, null));
|
resolve(toJsonHelper(req, requestTime, null));
|
||||||
|
Loading…
Reference in New Issue
Block a user