Hi all, I'm trying to relay an http connection to differents destination based on url filtering. It works great but since url used for filtering are on the same domain, browser tends to use a persistent connection: "Connection: keep-alive".
Relayd seems to keep using the first match destination even when http request match the second one. Here is my relayd configuration: table <srv1> { 127.0.0.1 } table <srv2> { 127.0.0.1 } http protocol "httpfilter" { return error match url "www.example.org/" forward to <srv1> match url "www.example.org/api/" forward to <srv2> } relay www { listen on 127.0.0.1 port 80 protocol httpfilter forward to <srv1> port 8080 check tcp forward to <srv2> port 8181 check tcp } Here is how I test with persistent connection: curl http://www.example.org http://www.example.org/api/ and here is the log I get: relay www, session 1 (1 active), 0, 127.0.0.1 -> 127.0.0.1:8080, done, GET GET Giving a look at relayd source code I suppose that this scenario is known. In relay_http.c, int relay_match_actions(); relayd is changing the destination table with the one from the matched rule. Am I doing something wrong ? something not supported ? I'm more than willing to help on this. Regards, -- Paul Fariello