]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - server/helpers/signup.ts
Add auth header in plugins guide
[github/Chocobozzz/PeerTube.git] / server / helpers / signup.ts
index 7c73f7c5c02efcd8358a13bcef70a670e6c80baa..ed872539b194ad148cf8b4adce3927480f0a4540 100644 (file)
@@ -20,8 +20,10 @@ async function isSignupAllowed (): Promise<{ allowed: boolean, errorMessage?: st
 }
 
 function isSignupAllowedForCurrentIP (ip: string) {
+  if (!ip) return false
+
   const addr = ipaddr.parse(ip)
-  let excludeList = [ 'blacklist' ]
+  const excludeList = [ 'blacklist' ]
   let matched = ''
 
   // if there is a valid, non-empty whitelist, we exclude all unknown adresses too