This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 6777797 camel-jbang - Add health check status 6777797 is described below commit 67777973432d0c15ecc20f53c205093e297959ef Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Fri Jan 28 11:28:13 2022 +0100 camel-jbang - Add health check status --- .../src/main/java/org/apache/camel/main/VertxHttpServer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java index b1222b5..144ee95 100644 --- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java +++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/VertxHttpServer.java @@ -41,8 +41,6 @@ import org.apache.camel.support.SimpleEventNotifierSupport; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import static org.apache.camel.health.HealthCheckHelper.invoke; - /** * To setup vertx http server in the running Camel application */ @@ -147,6 +145,8 @@ public final class VertxHttpServer { dev.handler(new Handler<RoutingContext>() { @Override public void handle(RoutingContext ctx) { + ctx.response().putHeader("content-type", "text/plain"); + DevConsoleRegistry dcr = context.getExtension(DevConsoleRegistry.class); if (dcr != null && dcr.isEnabled()) { StringBuilder sb = new StringBuilder(); @@ -194,6 +194,8 @@ public final class VertxHttpServer { Handler<RoutingContext> handler = new Handler<RoutingContext>() { @Override public void handle(RoutingContext ctx) { + ctx.response().putHeader("content-type", "application/json"); + boolean all = ctx.currentRoute() == health; boolean liv = ctx.currentRoute() == live;