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