openresty / meta-lua-nginx-module

Meta Lua Nginx Module supporting both Http Lua Module and Stream Lua Module
66 stars 20 forks source link

feature: implemented ngx.resp.add_header. #32

Closed spacewander closed 6 years ago

spacewander commented 6 years ago

This pr is the sister pr of https://github.com/openresty/lua-resty-core/pull/180

agentzh commented 6 years ago

@spacewander Will you make add_header a function in a new ngx.req Lua module in the following location?

https://github.com/openresty/lua-resty-core/tree/master/lib/ngx/

We do not want to add more of the builtin Lua API functions now since every new Lua API function adds more GC and memory overhead even though the current OpenResty app does not really need it.

Thanks!

spacewander commented 6 years ago

@agentzh Do you mean ngx.resp Lua module?

agentzh commented 6 years ago

@spacewander Oh, yes, sorry. I mean ngx.resp.

agentzh commented 6 years ago

I pushed a modified patch to lua-nginx-module for now: https://github.com/openresty/lua-nginx-module/commit/9ea1c06

Waiting for your updated PR for lua-resty-core :)