import { registerTSPaths } from './server/helpers/register-ts-paths'
-
registerTSPaths()
-// FIXME: https://github.com/nodejs/node/pull/16853
-require('tls').DEFAULT_ECDH_CURVE = 'auto'
-
import { isTestInstance } from './server/helpers/core-utils'
if (isTestInstance()) {
require('source-map-support').install()
loadLanguages()
// ----------- PeerTube modules -----------
-import { installApplication } from './server/initializers'
+import { installApplication } from './server/initializers/installer'
import { Emailer } from './server/lib/emailer'
import { JobQueue } from './server/lib/job-queue'
import { VideosPreviewCache, VideosCaptionCache } from './server/lib/files-cache'
}
// For the logger
-morgan.token('remote-addr', req => {
- if (req.get('DNT') === '1') {
+morgan.token<express.Request>('remote-addr', req => {
+ if (CONFIG.LOG.ANONYMIZE_IP === true || req.get('DNT') === '1') {
return anonymize(req.ip, 16, 16)
}
return req.ip
})
-morgan.token('user-agent', req => {
+morgan.token<express.Request>('user-agent', req => {
if (req.get('DNT') === '1') {
return useragent.parse(req.get('user-agent')).family
}