geoip_country_code header is deleted when I set another custom header

MarcPapers nginx-forum at nginx.us
Fri Jan 10 10:57:08 UTC 2014


Thanks Ruslan, obviously at the level(http server) that I was setting the
mobile header, it didn't use to inherit the geoip header because it was set
in a previous level (nginx configuration). I didn't see it. Thanks for your
help. What I did for doing it work properly was adding the geoip at the same
level, resulting like that:

location / {
                proxy_pass http://xx;
                access_log  /var/log/nginx/xx.access.log menosbasico;
                proxy_set_header GEOIP_COUNTRY_CODE $geoip_country_code;
                proxy_set_header ismobiletraff $mobile_flag;
        }

Thank you very much!

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,246224,246230#msg-246230



More information about the nginx mailing list