nginx_upstream_module icon indicating copy to clipboard operation
nginx_upstream_module copied to clipboard

Add Nginx config option to enable setting of response status code directly from Tarantool

Open nordluf opened this issue 6 years ago • 1 comments

It would be a good idea to have something like tnt_status_from_response on to Nginx config, what enables the ability to return from Tarantool status code and additional headers, like that: return data[, status=200 [, headers={}]]

nordluf avatar Mar 29 '18 13:03 nordluf

nordluf:

The documentation (on the 'Code' tab) says "Sometimes you have to set status or headers which came from Tarantool. For this purpose, you have to use something like ngx_lua or ngx_perl, etc."

But I like your suggestion better, its much less complex.

Note for others: you can change the 'content-type' header, globally, by adding this nginx.conf directive:

default_type  application/json;

donbarthel avatar Mar 30 '18 19:03 donbarthel