]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
Avoid too large cert error messages
authorChocobozzz <me@florianbigard.com>
Wed, 25 Nov 2020 13:43:18 +0000 (14:43 +0100)
committerChocobozzz <me@florianbigard.com>
Wed, 25 Nov 2020 13:43:43 +0000 (14:43 +0100)
server/helpers/logger.ts

index 9553f70e80d60986149c7eb8726ea6d2e7c84f31..a4bd414274b43da679569a533bef7ed0be5d225f 100644 (file)
@@ -18,6 +18,8 @@ function getLoggerReplacer () {
 
   // Thanks: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#Examples
   return (key: string, value: any) => {
+    if (key === 'cert') return 'Replaced by the logger to avoid large log message'
+
     if (typeof value === 'object' && value !== null) {
       if (seen.has(value)) return