location @test{
content_by_lua_block {
require("lua.code.path").content_by_lua()
}
replace_filter "search_term" "replace_term";
}
--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openresty-en...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openresty-en/602556b1-9d30-48f9-89b9-76ebed37f70d%40googlegroups.com.
you can get from my code . github openstar body_filter …
code_junkie <giri...@gmail.com>于2020年5月10日 周日12:15写道:
Hi,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:
location @test{
content_by_lua_block {
require("lua.code.path").content_by_lua()
}
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.--
You received this message because you are subscribed to the Google Groups "openresty-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openre...@googlegroups.com.