NGINX Ingress controller version:
0.24.1
Kubernetes version (use kubectl version):
1.11.1
What happened:
the configration $the_real_ip in ingress nginx controller 0.15.0 is
map $http_x_forwarded_for $the_real_ip {
default $remote_addr;
}
the configration $the_real_ip in ingress nginx controller 0.24.1 is
map '' $the_real_ip {
default $remote_addr;
}
in version 0.24.1 my php in pod can not get user real ip
my structure lvs+nginx+ingress nginx +nginx +php
What you expected to happen:
in php x_forward should hava 3 ips
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know:
i have got a way to fix my probelem
add the fllow configrations to configmap nginx-configuration
compute-full-forwarded-for: 'true'
use-forwarded-headers: 'true'
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
data:
compute-full-forwarded-for: 'true'
use-forwarded-headers: 'true'
reference
rootfs/etc/nginx/template/nginx.tmpl
Most helpful comment
i have got a way to fix my probelem
add the fllow configrations to configmap nginx-configuration
compute-full-forwarded-for: 'true'
use-forwarded-headers: 'true'
reference
rootfs/etc/nginx/template/nginx.tmpl