module.exports = req => {
  if (!req) return
  if (req.headers) {
    if (req.headers['x-forwarded']) {
      return req.headers['x-forwarded']
    }
    if (req.headers['forwarded-for']) {
      return req.headers['forwarded-for']
    }
    if (req.headers['x-client-ip']) {
      return req.headers['x-client-ip']
    }
  }

  if (req.connection && req.connection.remoteAddress) {
    return req.connection.remoteAddress
  }

  if (req.socket && req.socket.remoteAddress) {
    return req.socket.remoteAddress
  }
}

@@ -74,32 +74,40 @@
 (req.headers%5B'x-
+zeit-co-
 forwarded'%5D) %7B%0A 
@@ -99,16 +99,20 @@
 orwarded
+-for
 '%5D) %7B%0A  
@@ -137,16 +137,24 @@
 ders%5B'x-
+zeit-co-
 forwarde
@@ -154,16 +154,20 @@
 orwarded
+-for
 '%5D%0A    %7D
@@ -274,30 +274,28 @@
 .headers%5B'x-
-client
+real
 -ip'%5D) %7B%0A   
@@ -323,14 +323,12 @@
 %5B'x-
-client
+real
 -ip'

Fix real ip