]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server.ts
Translated using Weblate (Portuguese (Portugal))
[github/Chocobozzz/PeerTube.git] / server.ts
index 5cfa09445537215fd3f9c772955d45a02ddd1b9a..8df3add2cdd3abfa6291c9cbae2ca82c271092c2 100644 (file)
--- 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)
   }