Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4733

Migrating rspirep to http-response replace-header

$
0
0

Currently I am using the following haproxy version:
HA-Proxy version 1.8.19-1+deb10u3 2020/08/01

The following backend configuration snippet

backend radicale-https
     ...
     acl hdr_location res.hdr(Location) -m found
     rspirep ^Location:\ (http|https)://127.0.0.1\/(.*) Location:\ /radicale/ if hdr_location
     ...

I would like to upgrade to haproxy 2.2.3 with the following modification:

     acl hdr_location res.hdr(Location) -m found
     http-response replace-header ^Location:\ (http|https)://127.0.0.1\/(.*) Location:\ /radicale/ if { hdr_location }

However when checking the configuration with haproxy, I get the following error message:

     [ALERT] 355/171925 (3198) : parsing [/etc/haproxy/haproxy.cfg:112]: 'http-response replace-header' expects either 'if' or 'unless' followed by a condition but found '{'.

Could someone support me on ho to migrate this configuration line correctly? Thank’s in advance!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4733

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>