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

Replace Header regex

$
0
0

Hi ,
I am trying to replace header using regex

The header is as
https://135.222.142.216:8443/cas/login?service=https://135.222.142.216:8443/search/login/cas

and i want to replace the first occurences of “8443” with another port for exanple 9999.

I tried with following, but they are not correct

http-response replace-header Location (.)(\b:8443/\b)(.)$ \1:"$port"/\3
http-response replace-header Location (.)(\b:8443/\b)(.)(?=?) \1:"$port"/\3

Any help would be much appreciated.
regards
Tridev

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4720

Trending Articles



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