How to get the value of a config file param during cycle init?
tarkin000 opened this issue · 2 comments
tarkin000 commented
Hello,
I looked through the wiki, and had a quick look in the nginx source, but can't quite understand how to get the value of a config file parameter?
location /foo {
root /custom/path/to/assets;
ngx_link_func_call "foo";
}
How would I get the value of root during ngx_link_func_init_cycle
?
Taymindis commented
No, I don’t implement for cross module checked, the root directive is from another module. If you want config key value param, please use :-
For init cycle props -> extern u_char* ngx_link_func_cyc_get_prop(ngx_link_func_cycle_t *ctx, const char *key, size_t keylen);
For context session props -> extern u_char* ngx_link_func_get_prop(ngx_link_func_ctx_t *ctx, const char *key, size_t keylen);
tarkin000 commented
I understand now, thank you.