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

Replace path not working

$
0
0

Hi,

On haproxy version HA-Proxy version 2.2.20-1ppa1~bionic 2022/01/12 , (Ubuntu 18.04.3 LTS) we are trying to rewrite a complete request so that we can hit the backend server.

http-request set-header Host api.back.server.com
http-request replace-path /pathv2 /v1

server back1 api.back.server.com:443 ssl check cookie s1 sni req.hdr(Host) verify none

The problem is when I open the URL from browser:

https://www.domain1.com/pathv2/session/login/action

It gets rewritten into:

https://api.back.server.com/pathv2/session/login/action

The /pathv2 isn’t changed and it should be. Any idea why?

I have also tried with regsub but it’s the same:
http-request set-path “%[path,regsub(^/pathv2,/v1,i)]”

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



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