X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.ts;h=8df3add2cdd3abfa6291c9cbae2ca82c271092c2;hb=759856ebc1392ff4dbc2f86089558d898e96aec9;hp=5cfa09445537215fd3f9c772955d45a02ddd1b9a;hpb=8d5e65349deebd499c0be10fe02d535a77d58ddb;p=github%2FChocobozzz%2FPeerTube.git diff --git a/server.ts b/server.ts index 5cfa09445..8df3add2c 100644 --- a/server.ts +++ b/server.ts @@ -1,12 +1,11 @@ -require('module-alias/register') +import { registerTSPaths } from './server/helpers/register-ts-paths' -// FIXME: https://github.com/nodejs/node/pull/16853 -import { PluginManager } from './server/lib/plugins/plugin-manager' +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() } @@ -121,6 +120,7 @@ import { PeerTubeSocket } from './server/lib/peertube-socket' import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' import { Hooks } from './server/lib/plugins/hooks' +import { PluginManager } from './server/lib/plugins/plugin-manager' // ----------- Command line ----------- @@ -142,7 +142,7 @@ if (isTestInstance()) { // For the logger morgan.token('remote-addr', req => { - if (req.get('DNT') === '1') { + if (CONFIG.LOG.ANONYMIZE_IP === true || req.get('DNT') === '1') { return anonymize(req.ip, 16, 16) }