Override a set_empty variable from http params

Quintin Par quintinpar at gmail.com
Sun Oct 14 18:30:22 UTC 2012


Hi all,

I set the some params to my backend server as shown below

set_if_empty $country_code $http_x_country_code;

proxy_set_header   X-Country-Code   $country_code;

Now the http_x_country_code comes via the GeoIP module.

Is there a way here I can override this based on an HTTP param I can set.

Say site.com/country=US and country variable has greater precedence over
the http_x_country_code.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20121014/e787636f/attachment.html>


More information about the nginx mailing list