I want to control behaviour of my module at runtime(body filtering phase), depending on different data (reg exp in headers, value of different variables...), so I decided to add variable in my module, and then set value in nginx config with "set" operation in rewrite module.
I am adding variable via ngx_http_add_variable() in pre-config, set set_handler, and when I am doing "set $my_variable "0" " in nginx config, I get "duplicate variable my_variable" on nginx start up.
What I am doing wrong? May be I need to set variable by set, and In my module get index, and then get value of variable?