<p>Using Kong ingress controller (v2.1) in Kubernetes. Running in Digital Ocean.</p>
<p>The problem is that client IP is missing in X-FORWARDED-FOR header for HTTPS request, yet present on the HTTP request. I need to be able to see the IP on the HTTPS requests as well.</p>
<p>The value received in X-FORWARDED-FOR header on HTTP request is &quot;&lt;the-client-ip&gt;, &lt;the-k8s-node-ip&gt;&quot;.
Yet in case of HTTPS request the value is &quot;&lt;the-k8s-node-ip&gt;&quot;. The client-ip is lost.</p>
<p>Kong installed using Help. The most relevant part of config is:</p>
<pre><code>proxy:
  enabled: true
  http:
    enabled: true
  annotations:
    service.beta.kubernetes.io/do-loadbalancer-protocol: &quot;http&quot;
    service.beta.kubernetes.io/do-loadbalancer-algorithm: &quot;round_robin&quot;
    service.beta.kubernetes.io/do-loadbalancer-tls-ports: &quot;443&quot;
    service.beta.kubernetes.io/do-loadbalancer-tls-passthrough: &quot;true&quot;
</code></pre>

rubenhak
<p>The problem is with the SLL Passthrough. You can't modify headers when using this configuration. You should rather use SSL termination, unless you have some specific compliance requirements.</p>
<p>Checkout the doc for more:
<a href="https://www.digitalocean.com/docs/networking/load-balancers/how-to/ssl-passthrough/" rel="nofollow noreferrer">https://www.digitalocean.com/docs/networking/load-balancers/how-to/ssl-passthrough/</a></p>
