Hoping someone can point me in the right direction.
I am trying to configure HAProxy to use an environment variable (from the operating system) as part of an acl statement. So if the environment variable is set to true when HAProxy is started or reloaded then access is granted. If the environment variable is set to false then I would just want the NOSVR error to be generated.
I know that if I also put in a rule that says use_backend ftp1-srv unless accessFtp then the request goes through OK which seems to indicate that the acl section is is not working.
I have found very little in my searches that show how to use environment variables in this way just that you should be able to do a sample fetch from the internal state with env(name)
This is what I have tried so far:
frontend ftp-in
bind *:2200
mode tcp
option tcplog
log /dev/log local1 debug
acl accessFtp env(accessFTP) eq true
use_backend ftp1-srv if accessFtp
backend ftp1-srv
balance source
option tcplog
server ftp1 127.0.0.1:21