I am upgrading our load balancers (haproxy 1.8.20 to haproxy 2.4.12) and some of the original configurations are deprecated. The one giving me the most trouble is reqirep. I understand that I need to use http-request replace-header instead of reqirep. I’ve learned that doing a simple find/replace reqirep with http-request replace-header won’t work given the current syntax we’re using. Hoping someone can help me understand this syntax better.
My current configuration with reqirep. Do I understand it correctly that reqirep uses two parameters ( and )? How can you tell where the search parameter ends and the replace parameter starts?
reqirep ^(.*)\ /oranges/.*-(\d+)-orange.html\ (.*) \1\ /orange.asp?id=\2\ \3
reqirep ^(.*)\ /oranges(/orange.asp.*)\ (.*) \1\ /oranges-old\2\ \3
reqirep ^(.*)\ /oranges(/orange-lookup-box/.*)\ (.*) \1\ /oranges-old\2\ \3
reqirep ^(.*)\ /py/do/lookupresults.asp(.*)\ (.*) \1\ /oranges/orange-lookup.asp\2\ \3
I found this article [PATCH 1/2] DOC: split the http-request actions in their own section while researching, is this the correct basic format for replace-header?
replace-header <name> <match-regex> <replace-fmt>
If it is, does this mean I’m only missing the parameter?
1 post - 1 participant