Access Nginx variables from HTTP modules
Paulo Silva
pauloasilva at gmail.com
Thu Mar 29 16:12:01 UTC 2018
Would it be Ok doing something like?
ngx_str_t variable_name = ngx_string("request_id");
ngx_uint_t variable_name_hash;
ngx_http_variable_value_t *variable = NULL;
variable_name_hash = ngx_hash_key(variable_name.data, variable_name.len);
variable = ngx_http_get_variable(r, &variable_name, variable_name_hash);
On Thu, Mar 29, 2018 at 4:39 PM, Vladimir Homutov <vl at nginx.com> wrote:
> On Thu, Mar 29, 2018 at 04:17:02PM +0100, Paulo Silva wrote:
>> Hi everyone,
>> can you point me the right way to access Nginx variables from my HTTP module?
>>
>> I am looking for a way to read the $request_id value from within one
>> of my modules' functions.
>>
>
> http://nginx.org/en/docs/dev/development_guide.html#http_variables
>
> _______________________________________________
> nginx-devel mailing list
> nginx-devel at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx-devel
--
Paulo A. Silva
https://a-caminho.de
https://tech.pauloasilva.com
More information about the nginx-devel
mailing list