Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I apologize for the poorly worded question/title but basically… I’m running a NodeJS-based API (express) behind an NGINX reverse proxy on DO. I’m trying to obtain the API requestor’s IP address for each request, however the address i’m receiving is my droplets private IP address.
The important bits of my nginx config:
server {
server_name <domain_name>;
location / {
proxy_pass http://:;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
}
and i’m using the following JS to get the IP address
const ip = ctx.req.header('x-forwarded-for') || ctx.req.connection.remoteAddress
Again, this is returning the private IP of the droplet instead of the user’s actual IP address. Any help is so appreciated!
ebeecroft
68aa2215160846bca0a00f952c5fdc
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e