fix price and modular

This commit is contained in:
2026-02-01 17:38:39 +03:30
parent 55f34aa15d
commit 164542d3e2
801 changed files with 16129 additions and 14478 deletions
+13 -6
View File
@@ -411,7 +411,9 @@ function readRawBody(event, encoding = "utf8") {
});
return encoding ? promise2.then((buff) => buff.toString(encoding)) : promise2;
}
if (!Number.parseInt(event.node.req.headers["content-length"] || "") && !String(event.node.req.headers["transfer-encoding"] ?? "").split(",").map((e) => e.trim()).filter(Boolean).includes("chunked")) {
if (!Number.parseInt(event.node.req.headers["content-length"] || "") && !/\bchunked\b/i.test(
String(event.node.req.headers["transfer-encoding"] ?? "")
)) {
return Promise.resolve(void 0);
}
const promise = event.node.req[RawBodySymbol] = new Promise(
@@ -1433,11 +1435,16 @@ async function updateSession(event, config, update) {
async function sealSession(event, config) {
const sessionName = config.name || DEFAULT_NAME;
const session = event.context.sessions?.[sessionName] || await getSession(event, config);
const sealed = await seal(config.crypto || crypto, session, config.password, {
...defaults,
ttl: config.maxAge ? config.maxAge * 1e3 : 0,
...config.seal
});
const sealed = await seal(
config.crypto || crypto,
session,
config.password,
{
...defaults,
ttl: config.maxAge ? config.maxAge * 1e3 : 0,
...config.seal
}
);
return sealed;
}
async function unsealSession(_event, config, sealed) {