http-request set-var(txn.a) hdr(Origin)
acl x var(txn.a),lower,map(/etc/haproxy/test.map,'false') -m found
http-response add-header B %[var(txn.a)] if x
I expected the behavior to be that if a request’s Origin header content is present in test.map file, the response will have a new header B with that content. However I’m getting header B set with Origin’s content despite if the content is in test.map or not. What did I do wrong? Thanks for the help in advance.
I’m getting the content I wanted(the content from request’s Origin header). It’s just getting set all the time instead of only getting set when the content is in the map file.