Reqrep이 HAPROXY 1.5.18에서 쿼리 문자열을 업데이트하지 않습니다.

Reqrep이 HAPROXY 1.5.18에서 쿼리 문자열을 업데이트하지 않습니다.

나는 HAPROXY 1.5.18을 원합니다.쿼리 문자열의 매개변수 업데이트(&mc=cg ~ &mc=cd)

나는 이 구성을 가지고 있습니다 :

global
    user haproxy
    group haproxy
    pidfile /var/run/haproxy.pid
    daemon

defaults
    log                 global
    mode                http
    retries             3
    balance             roundrobin
    maxconn             1000
    option              redispatch
    timeout client      10m
    timeout server      10m
    timeout queue       5s
    timeout connect     5s

    log-format [%t]\ [%ci/%ft/%b/%s]\ [%Tq/%Tw/%Tc/%Tr/%Tt]\ [%ac/%fc/%bc/%sc/%rc]\ [%sq/%bq]\ %ST\ %B\ %{+Q}r\ %hr

frontend F_4_RPA
    bind 192.168.100.200:443 ssl crt /etc/ssl/certs/app_cert.pem
    acl APP1_ACL hdr(host) -i app1.x.y
    acl APP2_ACL hdr(host) -i app2.x.y
    acl APP3_ACL hdr(host) -i app3.x.y
    use_backend B_2_APP1 if IGT_ACL
    use_backend B_2_APP2 if ADT_ACL
    use_backend B_2_APP3 if EXP_ACL


backend B_2_APP3
    reqirep ^([^\ ]*)mc=cg(.*)    \1mc=cd\2
    server app301 ...
    server app302 ...

URL 예: https://app3.xy/appse/mashup/ExposeV1/getCa?service=71cceda2-75a8-2cbf-4bc0-69e1a0a352fg&mc=cg&platform=test1

나는 항상 cd 대신 mc=cg로 출력합니다(일치하지 않는다고 생각하는데 왜 그럴까요?).

인터넷을 통해 일부 테스터에서 내 정규 표현식을 테스트했는데 작동해야 하지만 작동하지 않습니다...

어떤 아이디어? :)

감사해요

답변1

reqirep ^([^\ ]*)(\ .*)mc=cg(.*)    \1\2mc=cd\3

완벽하게 작동합니다.

관련 정보