mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-12 05:27:56 +00:00
QFIX: Rpc response body size (#9160)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
67fc7dd0c4
commit
ff16fac754
@ -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' } : {})
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user