Re: conditional expression

2017-03-05 Thread 173279834462
Works for me (so far): map $query_string $bad_query { "~[^&;]+([&;][^&;]*){1,}" 1; # deny two or more parameters "~emailaddress=[^@]+%40[^@]+" 0; # allow Thunderbird autoconf "~.+=.+"1; # deny any other query defau

Re: conditional expression

2017-03-04 Thread Kevin Jones
Also, It might be better to check the $arg_*argument *variable instead and also set a check for $is_args. NGINX will process them in order within the configuration. map $is_args $redirect { "?" "1"; default ""; } map $arg_emailaddress $redirect { ~.+%40[a-z

Re: conditional expression

2017-03-04 Thread Kevin Jones
Hi, You would be better to accomplish this with map. Would this work? map $args $redirect { ~emailaddress=.+%40[a-zA-Z0-9\.\-] ''; default "1"; } server { ... location / { ... } location /foo { if ($redirect)

conditional expression

2017-03-04 Thread 173279834462
Hello, Our local policy demands the rejection of any query; we do this as follows: if ($is_args) { return 301 /; } The introduction of Thunderbird autoconfiguration demands an exception to the above policy, because of "GET /.well-known/autoconfig/mail/config-v1.1.xml?emailaddre=uname%40example.