openresty / headers-more-nginx-module

Set, add, and clear arbitrary output headers in NGINX http servers
1.65k stars 221 forks source link

Get header value using Lua before hiding header by clear_more_headers #140

Open SanaZulfiqar73 opened 2 years ago

SanaZulfiqar73 commented 2 years ago

Hi,

I have the scenario where I am receiving a response header in nginx and want to retrieve one value from the response header using lua in the http block. Also, When I send this response header to user I want to remove that header from the response. When I do that using "clear_more_headers" in server block, Lua block also don't get the value for that response header. I want to know is there a way I can get the value first and then clear that header.

thanks

zhuizhuhaomeng commented 2 years ago

use lua to clear the header.