summaryrefslogtreecommitdiff
path: root/www/npm/files/extra-patch-bug-178881
blob: 2b6c945d6f5f3c5f541941a77fdae2c9e783aa38 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--- lib/config/defaults.js.orig	2015-05-01 04:03:19 UTC
+++ lib/config/defaults.js
@@ -316,26 +316,7 @@ exports.types =
   }
 
 function getLocalAddresses () {
-  var interfaces
-  // #8094: some environments require elevated permissions to enumerate
-  // interfaces, and synchronously throw EPERM when run without
-  // elevated privileges
-  try {
-    interfaces = os.networkInterfaces()
-  } catch (e) {
-    interfaces = {}
-  }
-
-  return Object.keys(interfaces).map(function (nic) {
-    return interfaces[nic].filter(function (addr) {
-      return addr.family === 'IPv4'
-    })
-    .map(function (addr) {
-      return addr.address
-    })
-  }).reduce(function (curr, next) {
-    return curr.concat(next)
-  }, []).concat(undefined)
+  return [ '127.0.0.1', undefined ]
 }
 
 exports.shorthands =