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
  • Loading branch information
cescoffier committed Jun 6, 2023
1 parent 947d3a9 commit ffc0d8b
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 ffc0d8b

Please sign in to comment.