File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 11import fastify from 'fastify'
2- import { PG_META_EXPORT_DOCS , PG_META_PORT } from './constants'
2+ import { PG_META_EXPORT_DOCS , PG_META_PORT , PG_META_REQ_HEADER } from './constants'
33import routes from './routes'
44import { extractRequestForLogging } from './utils'
55import pino from 'pino'
@@ -17,6 +17,7 @@ const logger = pino({
1717const app = fastify ( {
1818 logger,
1919 disableRequestLogging : true ,
20+ requestIdHeader : PG_META_REQ_HEADER ,
2021} )
2122
2223app . setErrorHandler ( ( error , request , reply ) => {
Original file line number Diff line number Diff line change @@ -14,3 +14,4 @@ export const PG_CONNECTION = `postgres://${PG_META_DB_USER}:${PG_META_DB_PASSWOR
1414export const PG_META_EXPORT_DOCS = process . env . PG_META_EXPORT_DOCS === 'true' || false
1515
1616export const DEFAULT_POOL_CONFIG = { max : 1 , connectionTimeoutMillis : PG_CONN_TIMEOUT_SECS * 1000 }
17+ export const PG_META_REQ_HEADER = process . env . PG_META_REQ_HEADER || 'request-id'
You can’t perform that action at this time.
0 commit comments