OK, possibly stupid title, but here is the problem:
So far I've been running NGINX as a reverse proxy, terminating 443 and forwarding internally to a Node JS app on 8080. In order to pick up the external IP of a caller, I've set
proxy_set_header X-Forwarded-For $remote_addr;
was used.
As part of a change, I was forced to host two subdomains on 443 via NGINX. Somehow I learned that this then requires a "module configuration" (to be more specific: exactly here: https://jitsi.github.io/handbook/docs/devops-guide/turn).
Leaving the second application (COTURN) aside, I have now the following upstream configuration for my existing web app:
upstream web_backend {
server 127.0.0.1:4443;
}
So the default NGINX config now listens to 4443 and redirects - as before - internal plain TCP to 8080.
Unfortunately, the original IP is lost this way and X-FORWARDED-FOR only shows 127.0.0.1 in the 8080 application. I understand why: I think somehow the whole module configuration is missing "appropriate measures" to forward the external IP. I just don't know what to do about it :)
Does anyone know how to do this?
Thanks in advance