envoyproxy/envoy

feature request: header-matcher allow ignore case

Open

#12.056 geöffnet am 13. Juli 2020

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)C++ (5.373 Forks)batch import
area/configurationarea/httpenhancementhelp wanted

Repository-Metriken

Stars
 (27.997 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 8T) (378 gemergte PRs in 30 T)

Beschreibung

Envoy normalizes header keys, but not their values for good reason. We use a combination of the :authority header as well as the request path for H1/2 service routing. We have multiple services tied to a single filter chain and virtual host.

excerpt...

	"routes": [{
		"match": {
			"headers": [{
				"exactMatch": "myservice.mydomain.com",
				"name": ":authority"
			}],
			"prefix": "/servce/path"
		},
		"route": {
			"cluster": "mycluster",
		}
	}]
}

However, if there's a discrepancy in the header sent by the client, where for example they use an uppercase letter, then our route matching will not work; :authority = MYservice.MYdomain.com

As I see it, there are at least two options:

  1. add a flag to ignore the case for the header matchers; note that we already have the ignore case flag for the string matchers.
  2. ability to normalize some headers values

We could of course have a workaround using a regex, but the performance implications don't make it a viable option.

similar issues

Contributor Guide