Skip to content

Commit

Permalink
put rate limit at first
Browse files Browse the repository at this point in the history
Signed-off-by: huabing zhao <zhaohuabing@gmail.com>
  • Loading branch information
zhaohuabing committed Nov 16, 2023
1 parent f28a829 commit 3c1be45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/xds/translator/httpfilters.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ func newOrderedHTTPFilter(filter *hcmv3.HttpFilter) *OrderedHTTPFilter {

// Set a rational order for all the filters.
switch {
case filter.Name == wellknown.CORS:
case filter.Name == wellknown.HTTPRateLimit:
order = 1
case isOAuth2Filter(filter):
case filter.Name == wellknown.CORS:
order = 2
case filter.Name == jwtAuthnFilter:
case isOAuth2Filter(filter):
order = 3
case filter.Name == wellknown.HTTPRateLimit:
case filter.Name == jwtAuthnFilter:
order = 4
case filter.Name == wellknown.Router:
order = 100
Expand Down

0 comments on commit 3c1be45

Please sign in to comment.