QFIX: Rpc response body size (#9160)

Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
Andrey Sobolev 2025-06-03 17:52:37 +07:00 committed by GitHub
parent 67fc7dd0c4
commit ff16fac754
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -1677,7 +1677,7 @@ export function devTool (
name = systemAccountUuid
}
const wsByUrl = await db.workspace.findOne({ url: workspace })
const account = await db.socialId.findOne({ key: name })
const account = await db.socialId.findOne({ value: name })
console.log(
generateToken(account?.personUuid ?? (name as AccountUuid), wsByUrl?.uuid ?? (workspace as WorkspaceUuid), {
...(opt.admin ? { admin: 'true' } : {})

View File

@ -80,13 +80,13 @@ async function sendJson (
extraHeaders?: OutgoingHttpHeaders
): Promise<void> {
// Calculate ETag
let body: any = JSON.stringify(result, rpcJSONReplacer)
let body: Buffer = Buffer.from(JSON.stringify(result, rpcJSONReplacer), 'utf8')
const etag = createHash('sha256').update(body).digest('hex')
const headers: OutgoingHttpHeaders = {
...(extraHeaders ?? {}),
...keepAliveOptions,
'Content-Type': 'application/json',
'Content-Type': 'application/json; charset=utf-8',
'Cache-Control': 'no-cache',
ETag: etag
}