Hi.

Nov 27, 2019 9:38:35 PM Coscend@HAProxy :

>
> Dear HAProxy Community,
>
>
>
> We are upgrading from 2.0.9 to 2.1.0. Accordingly, we have to replace:
>
> · reqirep with http-request and
>
> · resprep with http-response.
>
>
>
> We are getting the following two errors.
>
> Error 1: 'http-request replace-header' expects exactly 3 arguments.
>
> Error 2: 'http-response replace-header' expects exactly 3 arguments.
>
>
>
> We would appreciate any insight into what we are missing in our config lines 
> below:
>
>
>
> 2.0.9 config line that worked:
>
> reqirep ^([^\ ]*)\ /CoscendP/*([^\ ]*)\ (.*)$ \1\ /\2\ \3
>
> rspirep ^(Location:)\ (https?://([^/]*))/(.*)$ Location:\ /CoscendP/\3
>
> Corresponding 2.1.0 config line that gives errors:
>
> http-request replace-header ^([^\ ]*)\ /CoscendP/*([^\ ]*)\ (.*)$ \1\ /\2\ \3

This should be replace-uri 
http://cbonte.github.io/haproxy-dconv/2.1/configuration.html#4.2-http-request%20replace-uri

I would try this.
http-request replace-uri /CoscendP/*([^\ ]*)\ (.*)$ /\2\ \3


> http-response replace-header ^(Location:)\ (https?://([^/]*))/(.*)$ 
> Location:\ /CoscendP/\3

I would use this as the header name isn't a regex.

http-response replace-header Location (https?://([^/]*))/(.*)$ Location:\ 
/CoscendP/\3

http://cbonte.github.io/haproxy-dconv/2.1/configuration.html#4.2-http-request%20replace-header

> Thank you.
>
> Sincerely,
>
> Hemant K. Sabat

Best regards
Aleks

> www.Coscend.com [http://www.coscend.com/]
>
> ------------------------------------------------------------------
>
> Real-time, Interactive Tele-healthcare, Tele-education, Telepresence 
> Services, on the fly…
>
> ------------------------------------------------------------------
>
> CONFIDENTIALITY NOTICE: See 'Confidentiality Notice Regarding E-mail Messages 
> from Coscend Communications Solutions' posted at: 
> http://www.Coscend.com/Anchor/Common/Terms_and_Conditions.html 
> [http://www.coscend.com/Anchor/Common/Terms_and_Conditions.html]



Reply via email to