yifan-c commented on code in PR #200: URL: https://github.com/apache/cassandra-sidecar/pull/200#discussion_r1964771346
########## server/src/main/java/org/apache/cassandra/sidecar/handlers/RouteBuilder.java: ########## @@ -127,47 +95,59 @@ public AccessProtectedRouteBuilder setBodyHandler(Boolean setBodyHandler) * Adds handler to handler chain of route. Handlers are ordered, they are called in order they are set in chain. * * @param handler handler for route - * @return a reference to {@link AccessProtectedRouteBuilder} for chaining + * @return a reference to {@link RouteBuilder} for chaining */ - public AccessProtectedRouteBuilder handler(Handler<RoutingContext> handler) + public RouteBuilder handler(Handler<RoutingContext> handler) { this.handlers.add(handler); return this; } + /** + * Indicate the route is not protected, i.e. does not require auth + * <p>Note that the method is to be accessed by {@link Factory} only + * @return a reference to {@link RouteBuilder} for chaining + */ + RouteBuilder setUnprotected() + { + this.accessProtected = false; + return this; + } + /** * Builds an authorized route. Adds {@link io.vertx.ext.web.handler.AuthorizationHandler} at top of handler * chain if access control is enabled. */ - public void build() + public VertxRoute build() { - Objects.requireNonNull(router, "Router must be set"); Review Comment: router must present now in the `VertxRoute` lambda -- 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: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org