# HTTP Endpoint Node no IP info about client/caller?

**URL:** <https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459>\
**Category:** General\
**Created:** [24 November 2020 15:19 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459 "2020-11-24T15:19:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JSONata](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@JSONata](https://discourse.nodered.org/u/JSONata)\
**Post date:** [24 November 2020 15:19 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459/1 "2020-11-24T15:19:30Z")

</div>

Hallo,

I'm setting up a HTTP node and I'm wondering if there is really no info about the IP of the client?

Nodes:  
`[{"id":"f7a89e10.8bd628","type":"http in","z":"b451655f.5db818","name":"","url":"/HTTPTest","method":"get","upload":false,"swaggerDoc":"","x":230,"y":600,"wires":[["ab80428a.a215a","6712c19f.c82958"]]},{"id":"ab80428a.a215a","type":"http response","z":"b451655f.5db818","name":"","statusCode":"","headers":{},"x":230,"y":660,"wires":[]},{"id":"6712c19f.c82958","type":"debug","z":"b451655f.5db818","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":430,"y":600,"wires":[]}]`

Called via:  
[http://192.168.178.21:1880/HTTPTest?test=test](http://192.168.178.21:1880/HTTPTest?test=test)

Resulting JSON

```json
{
  "_msgid": "615cfe19.49f0e",
  "payload": {
    "test": "test"
  },
  "req": {
    "_readableState": {
      "objectMode": false,
      "highWaterMark": 16384,
      "buffer": {
        "head": null,
        "tail": null,
        "length": 0
      },
      "length": 0,
      "pipes": null,
      "pipesCount": 0,
      "flowing": true,
      "ended": true,
      "endEmitted": true,
      "reading": false,
      "sync": true,
      "needReadable": false,
      "emittedReadable": false,
      "readableListening": false,
      "resumeScheduled": false,
      "emitClose": true,
      "autoDestroy": false,
      "destroyed": false,
      "defaultEncoding": "utf8",
      "awaitDrainWriters": null,
      "multiAwaitDrain": false,
      "readingMore": true,
      "decoder": null,
      "encoding": null
    },
    "readable": false,
    "_events": {},
    "_eventsCount": 1,
    "socket": "[internal]",
    "connection": "[internal]",
    "httpVersionMajor": 1,
    "httpVersionMinor": 1,
    "httpVersion": "1.1",
    "complete": true,
    "headers": {
      "host": "192.168.178.21:1880",
      "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0",
      "accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
      "accept-language": "de,en-US;q=0.7,en;q=0.3",
      "accept-encoding": "gzip, deflate",
      "dnt": "1",
      "connection": "keep-alive",
      "upgrade-insecure-requests": "1",
      "if-none-match": "W/\"f-SzkCEKs7NV6rxiz4/VbpzPnLKEM\"",
      "cache-control": "max-age=0"
    },
    "rawHeaders": [
      "Host",
      "192.168.178.21:1880",
      "User-Agent",
      "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0",
      "Accept",
      "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
      "Accept-Language",
      "de,en-US;q=0.7,en;q=0.3",
      "Accept-Encoding",
      "gzip, deflate",
      "DNT",
      "1",
      "Connection",
      "keep-alive",
      "Upgrade-Insecure-Requests",
      "1",
      "If-None-Match",
      "W/\"f-SzkCEKs7NV6rxiz4/VbpzPnLKEM\"",
      "Cache-Control",
      "max-age=0"
    ],
    "trailers": {},
    "rawTrailers": [],
    "aborted": false,
    "upgrade": false,
    "url": "/HTTPTest?test=test",
    "method": "GET",
    "statusCode": null,
    "statusMessage": null,
    "client": "[internal]",
    "_consuming": false,
    "_dumped": true,
    "baseUrl": "",
    "originalUrl": "/HTTPTest?test=test",
    "_parsedUrl": {
      "protocol": null,
      "slashes": null,
      "auth": null,
      "host": null,
      "port": null,
      "hostname": null,
      "hash": null,
      "search": "?test=test",
      "query": "test=test",
      "pathname": "/HTTPTest",
      "path": "/HTTPTest?test=test",
      "href": "/HTTPTest?test=test",
      "_raw": "/HTTPTest?test=test"
    },
    "params": {},
    "query": {
      "test": "test"
    },
    "res": "[internal]",
    "body": {},
    "_parsedOriginalUrl": {
      "protocol": null,
      "slashes": null,
      "auth": null,
      "host": null,
      "port": null,
      "hostname": null,
      "hash": null,
      "search": "?test=test",
      "query": "test=test",
      "pathname": "/HTTPTest",
      "path": "/HTTPTest?test=test",
      "href": "/HTTPTest?test=test",
      "_raw": "/HTTPTest?test=test"
    },
    "route": {
      "path": "/HTTPTest",
      "stack": [
        {
          "name": "cookieParser",
          "keys": [],
          "regexp": {
            "fast_star": false,
            "fast_slash": false
          },
          "method": "get"
        },
        {
          "name": "httpMiddleware",
          "keys": [],
          "regexp": {
            "fast_star": false,
            "fast_slash": false
          },
          "method": "get"
        },
        {
          "name": "corsHandler",
          "keys": [],
          "regexp": {
            "fast_star": false,
            "fast_slash": false
          },
          "method": "get"
        },
        {
          "name": "metricsHandler",
          "keys": [],
          "regexp": {
            "fast_star": false,
            "fast_slash": false
          },
          "method": "get"
        },
        {
          "name": "<anonymous>",
          "keys": [],
          "regexp": {
            "fast_star": false,
            "fast_slash": false
          },
          "method": "get"
        },
        {
          "name": "<anonymous>",
          "keys": [],
          "regexp": {
            "fast_star": false,
            "fast_slash": false
          },
          "method": "get"
        }
      ],
      "methods": {
        "get": true
      }
    },
    "cookies": {},
    "signedCookies": {}
  },
  "res": {}
}

```

Did I miss an option to get an info which IP is accessing the HTTP Endpoint?

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [24 November 2020 15:28 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459/2 "2020-11-24T15:28:48Z")

</div>

The full object is not reported in the debug, look at `msg.req.ip`

---

<div class="post-metadata">

**Author:** ![JSONata](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@JSONata](https://discourse.nodered.org/u/JSONata)\
**Post date:** [24 November 2020 15:32 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459/3 "2020-11-24T15:32:02Z")

</div>

Thanks for the fast reply. It works perfectly.

But why is the full Objekt not reported? I've set the debug node to print the whole message.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [24 November 2020 15:35 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459/4 "2020-11-24T15:35:27Z")

</div>

This thread explains more.

> [@Http in node, caller IP address](https://discourse.nodered.org/t/http-in-node-caller-ip-address/32820):
>
> I need to have the ability to get the client IP address. On my flow i have http-in node that accept (get api call), i need to be able to get the client Ip address who called the API. it is very urgent, appreciate your help

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [24 November 2020 23:44 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459/5 "2020-11-24T23:44:03Z")

</div>

It is not only very big but also contains circular references that aren't easily handled in display.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [8 December 2020 23:44 UTC](https://discourse.nodered.org/t/http-endpoint-node-no-ip-info-about-client-caller/36459/6 "2020-12-08T23:44:05Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
