How to enable X-Forwarded-Proto for aws Classic Load Balancer

2/13/2020

I have an nginx (nginx-ingress in k8s) setup behind AWS CLB, and according to HTTP Headers and Classic Load Balancers and Listener Configurations for Classic Load Balancers, I should be able to receive X-Forwarded-Proto header in nginx.

But after going through CLB listener configuration, I don't see anything about this setting, I set it up to forward TCP port 443 and try checking $http_x_forwarded_proto inside nginx, the $http_x_forwarded_proto returns null

-- Phootip
amazon-web-services
kubernetes
nginx

1 Answer

2/13/2020

Can you check you are getting other headers?

In Values.yaml, enable use-forwarded-headers

 config:
    use-forwarded-headers: "true"
-- Kushal Arya
Source: StackOverflow