I use the set_misc module from openresty and do something like:

    if ($request_uri ~ "([^/?]*)(?:\?|$)") {
      set $double_encoded_filename $1;
    }
    set_unescape_uri $encoded_uri $double_encoded_uri;

Can probably be improved, but I can use $encoded_uri and get the reslt you’re 
looking for c0nw0nk.



From: nginx <nginx-boun...@nginx.org> on behalf of Zhang Chao 
<zchao1...@gmail.com>
Reply-To: "nginx@nginx.org" <nginx@nginx.org>
Date: Tuesday, 8 August 2017 at 16.07
To: "nginx@nginx.org" <nginx@nginx.org>
Subject: Re: Get rid of args from $request_uri





On 8 August 2017 at 22:02:32, chilly_bang 
(nginx-fo...@forum.nginx.org<mailto:nginx-fo...@forum.nginx.org>) wrote:
c0nw0nk Wrote:
-------------------------------------------------------
> why don't you use
>
> $uri

Is it not so, that $uri will output an encoded url?

$uri is always the one decode once time and merge the slash(if you enable it).
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

Reply via email to