I have a variable say $foo and I need to do a case-insensitive match against a given pattern, but that pattern is also a variable received via a header. If that is true then I set a given variable to 1, which will be used later on. I tried with the following snippet:
set $variable 0; if ($foo ~* $http_header) { set $variable 1; }
This didn't work. I also tried using ${http_header}, "$http_header", "${http_header}", but none of these worked. Can someone please tell me how to achieve this?
P.S. I know there will be a solution with LUA scripts, but we need to avoid using that for the purposes of the project I am working on.