SM
map "$http_x_forwarded_for:$cf_connecting_ip" $the_real_ip {
default $http_x_forwarded_for;
'~^:[0-9.]+$' $cf_connecting_ip;
'~^:[0-9A-Fa-f:.]+$' $cf_connecting_ip; #ipv6
'' $remote_addr;
}
