File tree 2 files changed +3
-1
lines changed 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 1
1
import 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'
3
3
import routes from './routes'
4
4
import { extractRequestForLogging } from './utils'
5
5
import pino from 'pino'
@@ -17,6 +17,7 @@ const logger = pino({
17
17
const app = fastify ( {
18
18
logger,
19
19
disableRequestLogging : true ,
20
+ requestIdHeader : PG_META_REQ_HEADER ,
20
21
} )
21
22
22
23
app . 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
14
14
export const PG_META_EXPORT_DOCS = process . env . PG_META_EXPORT_DOCS === 'true' || false
15
15
16
16
export 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