dusty
1
Hello,
is it possible to compare two variables in haproxy without the need of a lua script ?
http-request set-var(req.cookieval) %[req.cook(myval)]
http-request set-var(req.checksum) hdr(My-Header),concat("secret"),sha2(256),hex
acl vars_equal %[var(req.cookieval)] eq %[var(req.checksum)]
Thanks in advance
sfl
2
Late for the party, but you can do it using strcmp. Thanks to this SO answer :
http-request set-var(req.cookieval) %[req.cook(myval)]
http-request set-var(req.checksum) hdr(My-Header),concat("secret"),sha2(256),hex
acl vars_equal var(req.cookieval),strcmp(req.checksum) eq 0