1. I am running Lua code on Nginx server, and want to replace some text in the body response. But I don't want to expose the regex in conf file. So is there a workaround to add replace_filter inside content_by_lua_block or somewhere else in lua code?
Code in my conf file:
replace_filter "search_term" "replace_term";
2. Also I want to use nginx context variables in both search and replace terms for the filter, is this possible?
Something like : replace_filter $var1 $var2;
I know this topic has been asked before on the forum, but still wanted to confirm again if there are any advancements on this.
Thanks in advance.