Nginx是否重定向到作为Nginx中的参数传递的编码URL?

Nginx是否重定向到作为Nginx中的参数传递的编码URL?,nginx,server,nginx-config,Nginx,Server,Nginx Config,我想从nginx重定向到一个URL,该URL以编码形式作为参数发送 location /v1/redirect { access_log /var/log/nginx/redirect/access.log main; error_log /var/log/nginx/redirect/error.log; return 302 $arg_dest; } 当我传递未编码的URL时,例如https://ex2.example2.co

我想从nginx重定向到一个URL,该URL以编码形式作为参数发送

location /v1/redirect {
        access_log /var/log/nginx/redirect/access.log main;
        error_log /var/log/nginx/redirect/error.log;
        return 302 $arg_dest;
        }
当我传递未编码的URL时,例如
https://ex2.example2.com/v1/redirect?dest=https://ex1.example2.com
它工作正常

但将dest参数编码为
https://ex2.example2.com/v1/redirect?dest=https%3A%2F%2Fex1.example2.com
。我的状态代码为304,我的URL正在更改为
https://ex2.example2.com/v1/https%3A%2F%2Fex1.example2.com


有人能帮我确定我做错了什么吗?有没有一种方法可以在返回之前对arg\u dest进行URL解码?谢谢

njs可以用来解决上述问题。查看并解决上述问题。

我认为URL解码器($arg\u dest)之类的任何东西都有帮助吗?nginx中有类似的功能吗?