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 4, 2023
1 parent 947d3a9 commit 3fb2e03
Show file tree
Hide file tree
Showing 2 changed files with 12 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("io.quarkus.vertx.http")) {
routeProducer.produce(DevConsoleRouteBuildItem.builder()
.method("POST")
.handler(recorder.kafkaControlHandler())
.path(KAFKA_ADMIN_PATH)
.bodyHandlerRequired()
.build());
}
}

@BuildStep(onlyIf = IsDevelopment.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ metadata:
- "reactive"
status: "stable"
unlisted: true
capabilities:
provides:
- "io.quarkus.vertx.http"
config:
- "quarkus.http."

0 comments on commit 3fb2e03

Please sign in to comment.