oscerd commented on code in PR #28175:
URL: https://github.com/apache/camel/pull/28175#discussion_r4324405925


##########
components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java:
##########
@@ -448,6 +450,42 @@ protected void doInit() throws Exception {
         ServiceHelper.initService(pluginRegistry);
     }
 
+    /**
+     * On a shared port the management endpoints are added to the main server, 
which keeps its own host, path, SSL and
+     * authentication. Fail instead of ignoring the management server settings 
it cannot apply.
+     */
+    private void checkSettingsApplyOnSharedServer(VertxPlatformHttpServer 
mainServer) {
+        List<String> ignored = new ArrayList<>();
+        String host = configuration.getBindHost();
+        if 
(!VertxPlatformHttpServerConfiguration.DEFAULT_BIND_HOST.equals(host)
+                && !Objects.equals(host, mainServer.getHost())) {
+            ignored.add("camel.management.host=" + host + " (the HTTP server 
binds to " + mainServer.getHost() + ")");
+        }
+        String path = configuration.getPath();
+        if (!VertxPlatformHttpServerConfiguration.DEFAULT_PATH.equals(path)
+                && !Objects.equals(path, mainServer.getPath())) {
+            ignored.add("camel.management.path=" + path + " (the HTTP server 
uses " + mainServer.getPath() + ")");
+        }
+        if (configuration.getSslContextParameters() != null) {
+            ignored.add("sslContextParameters");

Review Comment:
   Done in de50fd32c2fb: the entry now reads `sslContextParameters (the HTTP 
server uses its own SSL configuration)`, in line with the others. I also added 
`ManagementHttpServerSharedPortTest.sharedPortRejectsManagementSslContextParameters`,
 because this entry had no test: only a programmatic setup can give the 
management server its own `sslContextParameters`.
   
   _Claude Code on behalf of Andrea Cosentino (@oscerd)_
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to