collado-mike commented on code in PR #423:
URL: https://github.com/apache/polaris/pull/423#discussion_r1831850445


##########
polaris-service/src/main/java/org/apache/polaris/service/PolarisApplication.java:
##########
@@ -261,10 +261,7 @@ public void run(PolarisApplicationConfig configuration, 
Environment environment)
         .addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, 
"/*");
 
     if (configuration.getRateLimiter() != null) {
-      environment
-          .servlets()
-          .addFilter("ratelimiter", new 
RateLimiterFilter(configuration.getRateLimiter()))
-          .addMappingForUrlPatterns(EnumSet.of(DispatcherType.REQUEST), true, 
"/*");
+      environment.jersey().register(new 
RateLimiterFilter(configuration.getRateLimiter()));

Review Comment:
   Semantically, there is a difference, as ServletFilters are applied before 
Jersey Filters. Practically, however, it shouldn't have an impact. I think the 
only real dependency the RateLimiter might have is that the RealmContext is set 
in case there are different rate limits per realm. Since the 
`ContextResolverFilter` still applies first, we shouldn't see a practical 
difference.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to