Add LOG_IDS env variable
This commit is contained in:
parent
751b702a55
commit
68b6b94e54
|
@ -54,9 +54,12 @@ const createServer = (config) => {
|
|||
|
||||
app.disable('x-powered-by')
|
||||
|
||||
if (process.env.NODE_ENV === 'development')
|
||||
if (process.env.NODE_ENV !== 'production')
|
||||
app.use(morgan('dev'))
|
||||
|
||||
if (process.env.LOG_IDS)
|
||||
app.use(morgan('[:date[clf]] :method :url req-id=:req[x-request-id] cf-ray=:req[cf-ray]'))
|
||||
|
||||
app.use(errorHandler)
|
||||
app.use(cors())
|
||||
|
||||
|
|
Loading…
Reference in New Issue