How to read variable in C code?

Witold Filipczyk witekfl at
Fri Dec 30 13:36:00 UTC 2016


there is map:
map $http_host $hosts {
  default 0; 1; 1;
  ... 1;

How to read the value of $hosts in C module code?
How to make it right, that's mean do not evaluate it more than once per request?

I want to do some modifications of body response based on 'type' of host and map
would simplify the code, at least hope so.

More information about the nginx-devel mailing list