I inherited a haproxy server that was running the version 1.8. Upgraded it to version 2.1. Haproxy wouldn't restart. Found in the log that the issue was with this line in the configuration file:
rsprep ^Set-Cookie:\ (.*) Set-Cookie:\ \1;\ Secure
The error was
The 'rsprep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead
Removed rsprep and it worked. But I am now curious to know what impact it may have. How do I replace the above configuration using http-response replace-header?