kezhenxu94 commented on code in PR #8917:
URL: https://github.com/apache/skywalking/pull/8917#discussion_r854857902


##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/server/HTTPHandlerRegister.java:
##########
@@ -18,8 +18,10 @@
 
 package org.apache.skywalking.oap.server.core.server;
 
+import com.linecorp.armeria.common.HttpMethod;
+import java.util.List;
 import org.apache.skywalking.oap.server.library.module.Service;
 
 public interface HTTPHandlerRegister extends Service {
-    void addHandler(Object httpService);
+    void addHandler(Object httpService, List<HttpMethod> allowedMethods);

Review Comment:
   `allowedMethods` should not be handler level, it should be server level, so 
I don't think it is a good idea to set in `addHandler` method, it should be set 
in constructing an `HTTPServer`



##########
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/server/HTTPHandlerRegister.java:
##########
@@ -18,8 +18,10 @@
 
 package org.apache.skywalking.oap.server.core.server;
 
+import com.linecorp.armeria.common.HttpMethod;
+import java.util.List;
 import org.apache.skywalking.oap.server.library.module.Service;
 
 public interface HTTPHandlerRegister extends Service {
-    void addHandler(Object httpService);
+    void addHandler(Object httpService, List<HttpMethod> allowedMethods);

Review Comment:
   `allowedMethods` can't be handler level, it should be server level, so I 
don't think it is a good idea to set in `addHandler` method, it should be set 
in constructing an `HTTPServer`



-- 
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