Welcome! Log In Create A New Profile

Advanced

How to read variable in C code?

Witold Filipczyk
December 30, 2016 08:38AM
Hi,

there is map:
map $http_host $hosts {
hostnames;
default 0;
.example.com 1;
.example.net 1;
...
.example.org 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.
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

How to read variable in C code?

Witold Filipczyk 540 December 30, 2016 08:38AM

Re: How to read variable in C code?

Maxim Dounin 415 December 30, 2016 09:44PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 189
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready