Welcome! Log In Create A New Profile

Advanced

Use /g (global) regex modifier in map

Gabriel Arrais
August 08, 2014 02:38AM
Is it possible somehow to use the global modifier in a regex map match?

I'm trying to use the map directive to filter the query string leaving
my proxy_cache_key with only known parameters.

For the first test I've tried to use a map like below to just catch all
parameters without really filtering them without success. In this case,
the variable $args_filtered ends empty.

map $args $args_filtered {
"~(?<list>[^=]*=[^&]+)/g" $list;
default /;

}


When I try the same map, without the /g modifier at the end of the
expression, the variable $args_filtered ends with only the first query
string parameter in it.

--
Posted via http://www.ruby-forum.com/.

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Use /g (global) regex modifier in map

Gabriel Arrais August 08, 2014 02:38AM

Re: Use /g (global) regex modifier in map

Maxim Dounin August 08, 2014 07:12AM

Re: Use /g (global) regex modifier in map

Gabriel Arrais August 08, 2014 11:08AM

Re: Use /g (global) regex modifier in map

Maxim Dounin August 08, 2014 12:16PM

Re: Use /g (global) regex modifier in map

Gabriel Arrais August 08, 2014 02:30PM

Re: Use /g (global) regex modifier in map

Maxim Dounin August 08, 2014 02:48PM

Re: Use /g (global) regex modifier in map

Gabriel Arrais August 08, 2014 04:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 134
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready