tarantool / nginx_upstream_module

Tarantool NginX upstream module (REST, JSON API, websockets, load balancing)
Other
174 stars 18 forks source link

Passing not only request into procedure #72

Open fsitedev opened 7 years ago

fsitedev commented 7 years ago

Currently we have to use 'tnt_pass_http_request' directive for passing the request into procedure. Alternatively it would be convenient to have the directive controlling arguments passing into procedure. So you can pass only that you really need.

Example:

# Passing xxx, yyy and zzz params from request
tnt_method_args $arg_xxx $arg_yyy $arg_zzz

# Passing remote address and cookie 'session'
tnt_method_args $remote_addr $cookie_session

p.s. 'tnt_method_args' directive name used only for example. Maybe it's better to name it 'tnt_pass_args'

p.p.s I don't remember exactly, whether nginx stores unescaping values in $arg_* variables or keeps them raw. If not so, it would be nice to have an ability to force unescaping for all variables passing into procedure