question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How do I get the real ip?

See original GitHub issue

I set app.proxy = true but sometimes I still get someone with ctx.ip = "127.0.0.x"

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

32reactions
runhwguocommented, Sep 2, 2017

in nginx: location / { proxy_pass http://test; proxy_set_header Host $host:$server_port; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Real-PORT $remote_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; }

in node koa: app.proxy = true; ip = ctx.ip;

13reactions
fengmk2commented, Feb 28, 2016

If your koa app behind a nginx, you must add ‘proxy_set_header X-Forwarded-For $remote_addr’ to the nginx proxy conf.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Find Real IP (Origin) address of Website? - Geekflare
How to Find Real IP (Origin) address of Website? · Censys search engine allows the researcher to find how websites are deployed with...
Read more >
How to Find Your Local and External IP Address - Lifehacker
Your device's IP address is both a critical piece of information and something you probably don't think about very much.
Read more >
Finding the IP address of a website behind Cloudflare
The way to locate the true hosting provider of a website behind a reverse proxy like Cloudflare is to look for clues from...
Read more >
Find Real IP (Origin) address of a Website - NixCP
There are many ways to find the real IP address of a website, you can use for example a simple ping command or...
Read more >
What Is My IP Address - See Your Public Address - IPv4 & IPv6
Find out what your public IPv4 and IPv6 address is revealing about you! My IP address information shows your IP location; city, region,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found