You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/04/17 11:29:24 UTC

(camel) branch main updated: CAMEL-22497: Make HTTPS easier for camel.server

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 a96bcdd16a5f CAMEL-22497: Make HTTPS easier for camel.server
a96bcdd16a5f is described below

commit a96bcdd16a5f2ef8f8650e980d1f8e4da9ee310a
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Fri Apr 17 13:29:08 2026 +0200

    CAMEL-22497: Make HTTPS easier for camel.server
---
 .../camel/component/platform/http/main/MainHttpServer.java     |  1 +
 .../camel/component/platform/http/main/MainHttpServerUtil.java | 10 +++++-----
 .../component/platform/http/main/ManagementHttpServer.java     |  1 +
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
index 4881996cc03d..787a16c65387 100644
--- a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
+++ b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
@@ -315,6 +315,7 @@ public class MainHttpServer extends ServiceSupport implements CamelContextAware,
                 camelContext,
                 platformHttpComponent.getHttpEndpoints(),
                 (server != null ? server.getPort() : getPort()),
+                configuration.isUseGlobalSslContextParameters(),
                 "HTTP endpoints summary");
     }
 
diff --git a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServerUtil.java b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServerUtil.java
index e585e32cc187..fae0037ff1cc 100644
--- a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServerUtil.java
+++ b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServerUtil.java
@@ -32,7 +32,7 @@ public class MainHttpServerUtil {
     private static final Logger LOG = LoggerFactory.getLogger(MainHttpServerUtil.class);
 
     protected static void setupStartupSummary(
-            CamelContext camelContext, Set<HttpEndpointModel> endpoints, int serverPort, String header)
+            CamelContext camelContext, Set<HttpEndpointModel> endpoints, int serverPort, boolean ssl, String header)
             throws Exception {
         camelContext.addStartupListener(new StartupListener() {
             private volatile Set<HttpEndpointModel> last;
@@ -47,7 +47,7 @@ public class MainHttpServerUtil {
                     int longestEndpoint = 0;
                     int longestVerbs = 0;
                     for (HttpEndpointModel u : endpoints) {
-                        String endpoint = getEndpoint(u);
+                        String endpoint = getEndpoint(u, ssl);
                         if (endpoint.length() > longestEndpoint) {
                             longestEndpoint = endpoint.length();
                         }
@@ -62,7 +62,7 @@ public class MainHttpServerUtil {
                     longestVerbs = Math.max(8, longestVerbs); // minimum length
                     String formatTemplate = "%-" + longestEndpoint + "s %-" + longestVerbs + "s %s";
                     for (HttpEndpointModel u : endpoints) {
-                        String endpoint = getEndpoint(u);
+                        String endpoint = getEndpoint(u, ssl);
                         String formattedVerbs = "";
                         if (u.getVerbs() != null) {
                             formattedVerbs = "(" + u.getVerbs() + ")";
@@ -82,8 +82,8 @@ public class MainHttpServerUtil {
                 last = new HashSet<>(endpoints);
             }
 
-            private String getEndpoint(HttpEndpointModel httpEndpointModel) {
-                return "http://0.0.0.0:" + serverPort + httpEndpointModel.getUri();
+            private String getEndpoint(HttpEndpointModel httpEndpointModel, boolean ssl) {
+                return (ssl ? "https" : "http") + "://0.0.0.0:" + serverPort + httpEndpointModel.getUri();
             }
 
             @Override
diff --git a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
index 05900bf0d054..d17b660b23d6 100644
--- a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
+++ b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
@@ -1285,6 +1285,7 @@ public class ManagementHttpServer extends ServiceSupport implements CamelContext
                 camelContext,
                 platformHttpComponent.getHttpManagementEndpoints(),
                 (server != null ? server.getPort() : getPort()),
+                configuration.isUseGlobalSslContextParameters(),
                 "HTTP Management endpoints summary");
     }