I'm trying to redirect a URL with nginx and at the same time, mirror the request to another location block. the mirror works fine when I use it with proxy_pass, but it doesn't work when used with nginx redirect
location / {
mirror /test
access by lua '
ngx.redirect("some url received from redis using lua scripts")
'
}
location /test {
proxy_pass <backend-service>
}