0

As the title says, I would like an HTTP filter to apply only if the request is for a certain URL path. Doing this at the route level is not possible, because my route is defined like this:

- match:
    prefix: "/api/"
  route:
    cluster: some_backend_service
    prefix_rewrite: "/"

But I would like to apply different (security related) filters for /api/foo than for /api/bar. I can't seem to find a way to do this looking at the documentation, is it even possible? Thanks.

Jon Bates
  • 107
  • 5
Pablote
  • 187
  • 2
  • 6

1 Answers1

2

The Composite Filter is exactly what you are looking for. Please refer to this page: https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/composite_filter.html

larry.li
  • 136
  • 3