mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-12 04:37:44 +02:00
UBERF-6374: Improve server logging and improve startup performance (#5210)
This commit is contained in:
@@ -292,7 +292,9 @@ export function start (
|
||||
const token = req.query.token as string
|
||||
const payload = decodeToken(token)
|
||||
const admin = payload.extra?.admin === 'true'
|
||||
res.writeHead(200, { 'Content-Type': 'application/json' })
|
||||
res.status(200)
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.setHeader('Cache-Control', cacheControlNoCache)
|
||||
|
||||
const json = JSON.stringify({
|
||||
metrics: metricsAggregate((ctx as any).metrics),
|
||||
@@ -301,7 +303,6 @@ export function start (
|
||||
},
|
||||
admin
|
||||
})
|
||||
res.set('Cache-Control', 'private, no-cache')
|
||||
res.end(json)
|
||||
} catch (err) {
|
||||
console.error(err)
|
||||
|
||||
Reference in New Issue
Block a user