Commit 6133a717 authored by Xavier Guimard's avatar Xavier Guimard

Add $env macro also in all rules

parent 5c8f42bd
......@@ -552,8 +552,9 @@ sub substitute {
$expr =~ s/\$ip\b/\$ENV{REMOTE_ADDR}/sg;
# substitute vars with session data, excepts special vars $_ and $\d+
$expr =~ s/\$(?!ENV)([_a-zA-Z]\w*)/\$s->{$1}/sg;
$expr =~ s/\$(?!ENV|env)([_a-zA-Z]\w*)/\$s->{$1}/sg;
$expr =~ s/\$ENV\{/\$r->{env}->\{/g;
$expr =~ s/\$env->\{/\$r->{env}->\{/g;
return $expr;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment