-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow HTTP CONNECT proxying to route based on HTTP headers #13042
Labels
Comments
@alyssawilk WDYT? |
No objection on my part. I think the problem was that all the other matchers assume the request has a path, and CONNECT HTTP/1.1 does not which is why @mattklein123 preferred separate matching entirely. Extending the CONNECT matcher to do other header based matching SGTM as long as we're careful to continue supporting nonexistent paths :-) |
nicktrav
added a commit
to nicktrav/envoy
that referenced
this issue
Sep 11, 2020
Currently, using `ConnectMatcher` as a `RouteMatch` will match only on an HTTP `:method` header of `CONNECT`. Extend the matching functionality to allow for use of the additional match criteria in `RouteMatch` - i.e. header matching, path matching, etc. - mimicking the existing behavior of the other matchers (prefix, path, etc.). Closes envoyproxy#13042. Signed-off-by: Nick Travers <[email protected]>
SGTM! |
mattklein123
pushed a commit
that referenced
this issue
Sep 11, 2020
Currently, using `ConnectMatcher` as a `RouteMatch` will match only on an HTTP `:method` header of `CONNECT`. Extend the matching functionality to allow for use of the additional match criteria in `RouteMatch` - i.e. header matching, path matching, etc. - mimicking the existing behavior of the other matchers (prefix, path, etc.). Closes #13042. Signed-off-by: Nick Travers <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently,
connect_matcher
only supports matching on the HTTPCONNECT
method.I'd like to propose / request enhancing this matcher by allowing it to match on the other fields under a route's
match
config. Specifically, we'd like to be able to use the HTTP headers to control where the CONNECT is directed.In terms of the existing code,
ConnectRouteEntryImpl
only supports checking to see if the request method isCONNECT
, here:envoy/source/common/router/config_impl.cc
Lines 1029 to 1036 in 50ef094
The following patch is essentially what we're looking for:
Happy to put up this patch along with some tests, unless there's good reason for not allowing more advanced matching for CONNECT?
The text was updated successfully, but these errors were encountered: