mirror of
https://github.com/hcengineering/platform.git
synced 2025-05-12 18:35:45 +00:00
Fix incompatibilities of front files server and datalake (#8730)
Signed-off-by: Nikolay Marchuk <nikolay.marchuk@hardcoreeng.com>
This commit is contained in:
parent
76a425ba98
commit
c28ead7a03
@ -458,9 +458,12 @@ export function start (
|
|||||||
try {
|
try {
|
||||||
const cookies = ((req?.headers?.cookie as string) ?? '').split(';').map((it) => it.trim().split('='))
|
const cookies = ((req?.headers?.cookie as string) ?? '').split(';').map((it) => it.trim().split('='))
|
||||||
|
|
||||||
|
const authorization = ((req?.headers?.authorization as string) ?? '').split(' ')
|
||||||
|
const authorizationToken = authorization.at(0)?.toLowerCase() === 'bearer' ? authorization.at(1) : undefined
|
||||||
const token =
|
const token =
|
||||||
cookies.find((it) => it[0] === 'presentation-metadata-Token')?.[1] ??
|
cookies.find((it) => it[0] === 'presentation-metadata-Token')?.[1] ??
|
||||||
(req.query.token as string | undefined) ??
|
(req.query.token as string | undefined) ??
|
||||||
|
authorizationToken ??
|
||||||
''
|
''
|
||||||
const wsIds = await getWorkspaceIds(ctx, token, req.path)
|
const wsIds = await getWorkspaceIds(ctx, token, req.path)
|
||||||
if (wsIds === null) {
|
if (wsIds === null) {
|
||||||
@ -489,6 +492,7 @@ export function start (
|
|||||||
'accept-ranges': 'bytes',
|
'accept-ranges': 'bytes',
|
||||||
connection: 'keep-alive',
|
connection: 'keep-alive',
|
||||||
'Keep-Alive': 'timeout=5',
|
'Keep-Alive': 'timeout=5',
|
||||||
|
'content-type': blobInfo.contentType,
|
||||||
'content-length': blobInfo.size,
|
'content-length': blobInfo.size,
|
||||||
'content-security-policy': "default-src 'none';",
|
'content-security-policy': "default-src 'none';",
|
||||||
Etag: blobInfo.etag,
|
Etag: blobInfo.etag,
|
||||||
|
Loading…
Reference in New Issue
Block a user