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

Need some help with config - use_backend with path_sub and method type

$
0
0

Looking to have some of the http incoming redirected to a specific backend based on path content and method type.

If path contains “string1” and is a POST → backend2
If path contains “string1” and is a PUT → backend2
If path contains “string1” and is a DELETE → backend2

default is backend1

my attempt (not working) from my cfg file:

use_backend backend2 if { path_sub /string1/ } { method POST }
use_backend backend2 if { path_sub /string1/ } { method PUT }
use_backend backend2 if { path_sub /string1/ } { method DELETE }

This was based on another use_backend instance that is working:

use_backend backend3 if { path_sub /string2/ } { path_sub /string3/ }

I’m guessing my method spec isnt correct…

Can anyone point me in the right direction?

Thanks!

1 post - 1 participant

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>