Skip to content

Commit

Permalink
Only expose the Dev UI Routes if Vert.x HTTP is present
Browse files Browse the repository at this point in the history
(cherry picked from commit ffc0d8b)
  • Loading branch information
cescoffier authored and gsmet committed Jun 6, 2023
1 parent 180442d commit 1bf7e7f
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -561,14 +561,17 @@ public AdditionalBeanBuildItem kafkaClientBeans() {
@BuildStep(onlyIf = IsDevelopment.class)
@Record(ExecutionTime.RUNTIME_INIT)
public void registerKafkaUiExecHandler(
Capabilities capabilities,
BuildProducer<DevConsoleRouteBuildItem> routeProducer,
KafkaUiRecorder recorder) {
routeProducer.produce(DevConsoleRouteBuildItem.builder()
.method("POST")
.handler(recorder.kafkaControlHandler())
.path(KAFKA_ADMIN_PATH)
.bodyHandlerRequired()
.build());
if (capabilities.isPresent(Capability.VERTX_HTTP)) {
routeProducer.produce(DevConsoleRouteBuildItem.builder()
.method("POST")
.handler(recorder.kafkaControlHandler())
.path(KAFKA_ADMIN_PATH)
.bodyHandlerRequired()
.build());
}
}

@BuildStep(onlyIf = IsDevelopment.class)
Expand Down

0 comments on commit 1bf7e7f

Please sign in to comment.