Sorry for the double post, but wanted to post the complete conf ... just in
case there was a mistake
server {
listen 80;
server_name 127.0.0.1 10.0.9.44;
set $_ActualTarget "";
location / {
rewrite_by_lua '
local _args = n
As usual, found my error.
The following is properly matcing the regex :
local escUri = function (m)
local _str = "href=\\"http://10.0.9.44/?_redir_=";
_str = _str .. ngx.escape_uri(m[1]) .. "\\""
return _str
Hi,
I am trying to modify the response body in the following way :
If there href="http://www.google.com";, I will convert it to
href="http://nginx-ip/?_url_={url-encoded-form-of www.google.com}
This is what I have in my nginx.conf
location / {
body_filter_by_lua