nginx_upstream_module
nginx_upstream_module copied to clipboard
Add Nginx config option to enable setting of response status code directly from Tarantool
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:
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;