Nginx Map how to check value if empty

c0nw0nk nginx-forum at
Fri Mar 3 15:47:26 UTC 2017

So I have the following Map

map $http_cf_connecting_ip $client_ip_from_cf {
default $http_cf_connecting_ip;

How can I make it so if the client did not send that $http_ header it makes
$client_ip_from_cf variable value = $binary_remote_addr

Not sure how to check in a map if that http header is present.

Posted at Nginx Forum:,272744,272744#msg-272744

More information about the nginx mailing list