Get rid of args from $request_uri
Lucas Rolff
lucas at lucasrolff.com
Tue Aug 8 15:55:55 UTC 2017
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-bounces at nginx.org> on behalf of Zhang Chao <zchao1995 at gmail.com>
Reply-To: "nginx at nginx.org" <nginx at nginx.org>
Date: Tuesday, 8 August 2017 at 16.07
To: "nginx at nginx.org" <nginx at nginx.org>
Subject: Re: Get rid of args from $request_uri
On 8 August 2017 at 22:02:32, chilly_bang (nginx-forum at forum.nginx.org<mailto:nginx-forum at 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).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170808/cdc79468/attachment.html>
More information about the nginx
mailing list