lua-nginx-module
lua-nginx-module copied to clipboard
Set/Remove response headers without underscore to hyphen normalization
Hi @agentzh,
I would like to add support to set response headers without applying underscore to hyphen normalization. I know we can enable this globally by setting lua_transform_underscores_in_response_headers, but I need a way to do this on specific cases, while maintaining the normalization enabled globally.
I can implement this an open a PR, but I think it is a good idea to first discuss how this would look like. My idea is to create a function ngx.resp.set_header_raw(header_name, header_value) (header_value can be a string or a table, just like with ngx.header.HEADER).
Does that sound reasonable?