Score:0

Is it possible, with Envoy Proxy, to apply an HTTP filter based on the URL?

us flag

As the title says, I would like an HTTP filter to apply only if the request is for 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.

Score:0
lu flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.