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

How to use capture.req.uri?

$
0
0

@trococ wrote:

Hi

I would like to add some header to response if the path begins with something,

here is my config:

global
  debug
frontend www
  bind *:8000
  mode http
  http-response set-header TEST1 YES1 if { capture.req.uri -m beg /test/ }
  default_backend be

backend be
  mode http
  acl is_test capture.req.uri -m beg /test/
  http-response set-header TEST2 YES2 if is_test
  server s1 127.0.0.1:8080

But it does not work. Please help

I’m using v1.9.2.

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4728

Trending Articles



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