Re: Check if variable exists in file, Using file contents for variable handling

2013-08-29 Thread Maxim Dounin
Hello! On Thu, Aug 29, 2013 at 10:42:37AM -0400, spacecwoboy wrote: > Is there a way to check a variable against file contents for processing? A > couple scenarios below. > > This is used here, but adding multiple agents can get burdensome: > if ($http_user_agent ~ (agent1|agent2|Foo|Wget|Nmap|

Check if variable exists in file, Using file contents for variable handling

2013-08-29 Thread spacecwoboy
Is there a way to check a variable against file contents for processing? A couple scenarios below. This is used here, but adding multiple agents can get burdensome: if ($http_user_agent ~ (agent1|agent2|Foo|Wget|Nmap|BadAgent) ) { return 403; } I'd like to maintain a file with all the varia