variables in if regexes

inspire22 nginx-forum at
Sun May 1 05:04:21 MSD 2011

I have a caching system I need to bypass if the logging in user's name
is found in the $request_uri.  I'm trying to do something like this, but
can't get the variable to interpolate into the regex.  Any suggestions
pretty please?

    set $me "Asabouros.";    
    if ($uri ~ $me) { set $chk ""; }    

I've always tried things like this:
    if ($uri ~ "by-{$me}") { set $chk ""; }    


Posted at Nginx Forum:,194753,194753#msg-194753

More information about the nginx mailing list