Repository: quarkusio/quarkus
Issue: Gzip Compression Not Working over HTTPS

### Describe the bug

I want to compress static resources in Quarkus like js, css, and image. I was activated configuration for compression **quarkus.http.enable-compression:true**. It's working perfectly on HTTP mode but does not working over https.

### Expected behavior

Content will be compressed as GZIP over HTTPS

### Actual behavior

No GZIP compression over HTTPS

### How to Reproduce?

Steps to reproduce the behavior:


1. Git pull from [quarkus-demo](https://github.com/Herdi-73/quarkus-demo.git) I made earlier
2. Create certificate for enable SSL in localhost with [mkcert](https://web.dev/how-to-use-local-https/)
3. Compile with command mvn clean package -Dquarkus.profile=prod for running over HTTPS. If you want to test over HTTP please run with this command mvn quarkus:dev
4. Run quarkus app with this command java -jar target\\quarkus-app\\quarkus-run.jar
5. Finally, open your browser to access https://localhost or http://localhost:8080 and then please inspect element to check loaded resources details at Network tab

### Output of `uname -a` or `ver`

_No response_

### Output of `java -version`

_No response_

### GraalVM version (if different from Java)

_No response_

### Quarkus version or git rev

_No response_

### Build tool (ie. output of `mvnw --version` or `gradlew --version`)

_No response_

### Additional information

_No response_

Changed files:
extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java

diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java
index 8d6e7068b48..e9616ef08ad 100644
--- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java
+++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java
@@ -541,7 +541,8 @@ private static void doServerStart(Vertx vertx, HttpBuildTimeConfig httpBuildTime
         // Http server configuration
         HttpServerOptions httpServerOptions = createHttpServerOptions(httpConfiguration, launchMode, websocketSubProtocols);
         HttpServerOptions domainSocketOptions = createDomainSocketOptions(httpConfiguration, websocketSubProtocols);
-        HttpServerOptions sslConfig = createSslOptions(httpBuildTimeConfig, httpConfiguration, launchMode);
+        HttpServerOptions sslConfig = createSslOptions(httpBuildTimeConfig, httpConfiguration, launchMode,
+                websocketSubProtocols);
 
         if (httpConfiguration.insecureRequests != HttpConfiguration.InsecureRequests.ENABLED && sslConfig == null) {
             throw new IllegalStateException("Cannot set quarkus.http.redirect-insecure-requests without enabling SSL.");
@@ -662,7 +663,7 @@ private static void setHttpServerTiming(InsecureRequests insecureRequests, HttpS
      * Get an {@code HttpServerOptions} for this server configuration, or null if SSL should not be enabled
      */
     private static HttpServerOptions createSslOptions(HttpBuildTimeConfig buildTimeConfig, HttpConfiguration httpConfiguration,
-            LaunchMode launchMode)
+            LaunchMode launchMode, List<String> websocketSubProtocols)
             throws IOException {
         if (!httpConfiguration.hostEnabled) {
             return null;
@@ -700,9 +701,6 @@ private static HttpServerOptions createSslOptions(HttpBuildTimeConfig buildTimeC
                 serverOptions.setAlpnVersions(Arrays.asList(HttpVersion.HTTP_2, HttpVersion.HTTP_1_1));
             }
         }
-        serverOptions.setMaxHeaderSize(httpConfiguration.limits.maxHeaderSize.asBigInteger().intValueExact());
-        serverOptions.setMaxChunkSize(httpConfiguration.limits.maxChunkSize.asBigInteger().intValueExact());
-        serverOptions.setMaxFormAttributeSize(httpConfiguration.limits.maxFormAttributeSize.asBigInteger().intValueExact());
         setIdleTimeout(httpConfiguration, serverOptions);
 
         if (!certificates.isEmpty() && !keys.isEmpty()) {
@@ -745,20 +743,34 @@ private static HttpServerOptions createSslOptions(HttpBuildTimeConfig buildTimeC
         }
         serverOptions.setSsl(true);
         serverOptions.setSni(sslConfig.sni);
-        serverOptions.setHost(httpConfiguration.host);
         int sslPort = httpConfiguration.determineSslPort(launchMode);
         // -2 instead of -1 (see http) to have vert.x assign two different random ports if both http and https shall be random
         serverOptions.setPort(sslPort == 0 ? -2 : sslPort);
         serverOptions.setClientAuth(buildTimeConfig.tlsClientAuth);
-        serverOptions.setReusePort(httpConfiguration.soReusePort);
-        serverOptions.setTcpQuickAck(httpConfiguration.tcpQuickAck);
-        serverOptions.setTcpCork(httpConfiguration.tcpCork);
-        serverOptions.setTcpFastOpen(httpConfiguration.tcpFastOpen);
-        serverOptions.setMaxInitialLineLength(httpConfiguration.limits.maxInitialLineLength);
+
+        applyCommonOptions(serverOptions, httpConfiguration, websocketSubProtocols);
 
         return serverOptions;
     }
 
+    private static void applyCommonOptions(HttpServerOptions httpServerOptions, HttpConfiguration httpConfiguration,
+            List<String> websocketSubProtocols) {
+        httpServerOptions.setHost(httpConfiguration.host);
+        setIdleTimeout(httpConfiguration, httpServerOptions);
+        httpServerOptions.setMaxHeaderSize(httpConfiguration.limits.maxHeaderSize.asBigInteger().intValueExact());
+        httpServerOptions.setMaxChunkSize(httpConfiguration.limits.maxChunkSize.asBigInteger().intValueExact());
+        httpServerOptions.setMaxFormAttributeSize(httpConfiguration.limits.maxFormAttributeSize.asBigInteger().intValueExact());
+        httpServerOptions.setWebSocketSubProtocols(websocketSubProtocols);
+        httpServerOptions.setReusePort(httpConfiguration.soReusePort);
+        httpServerOptions.setTcpQuickAck(httpConfiguration.tcpQuickAck);
+        httpServerOptions.setTcpCork(httpConfiguration.tcpCork);
+        httpServerOptions.setAcceptBacklog(httpConfiguration.acceptBacklog);
+        httpServerOptions.setTcpFastOpen(httpConfiguration.tcpFastOpen);
+        httpServerOptions.setCompressionSupported(httpConfiguration.enableCompression);
+        httpServerOptions.setDecompressionSupported(httpConfiguration.enableDecompression);
+        httpServerOptions.setMaxInitialLineLength(httpConfiguration.limits.maxInitialLineLength);
+    }
+
     private static KeyStoreOptions createKeyStoreOptions(Path path, String password, Optional<String> fileType,
             Optional<String> provider, Optional<String> alias, Optional<String> aliasPassword) throws IOException {
         final String type;
@@ -849,22 +861,11 @@ private static HttpServerOptions createHttpServerOptions(HttpConfiguration httpC
         }
         // TODO other config properties
         HttpServerOptions options = new HttpServerOptions();
-        options.setHost(httpConfiguration.host);
         int port = httpConfiguration.determinePort(launchMode);
         options.setPort(port == 0 ? -1 : port);
-        setIdleTimeout(httpConfiguration, options);
-        options.setMaxHeaderSize(httpConfiguration.limits.maxHeaderSize.asBigInteger().intValueExact());
-        options.setMaxChunkSize(httpConfiguration.limits.maxChunkSize.asBigInteger().intValueExact());
-        options.setMaxFormAttributeSize(httpConfiguration.limits.maxFormAttributeSize.asBigInteger().intValueExact());
-        options.setWebSocketSubProtocols(websocketSubProtocols);
-        options.setReusePort(httpConfiguration.soReusePort);
-        options.setTcpQuickAck(httpConfiguration.tcpQuickAck);
-        options.setTcpCork(httpConfiguration.tcpCork);
-        options.setAcceptBacklog(httpConfiguration.acceptBacklog);
-        options.setTcpFastOpen(httpConfiguration.tcpFastOpen);
-        options.setCompressionSupported(httpConfiguration.enableCompression);
-        options.setDecompressionSupported(httpConfiguration.enableDecompression);
-        options.setMaxInitialLineLength(httpConfiguration.limits.maxInitialLineLength);
+
+        applyCommonOptions(options, httpConfiguration, websocketSubProtocols);
+
         return options;
     }
 
@@ -874,12 +875,9 @@ private static HttpServerOptions createDomainSocketOptions(HttpConfiguration htt
             return null;
         }
         HttpServerOptions options = new HttpServerOptions();
-        options.setHost(httpConfiguration.domainSocket);
-        setIdleTimeout(httpConfiguration, options);
-        options.setMaxHeaderSize(httpConfiguration.limits.maxHeaderSize.asBigInteger().intValueExact());
-        options.setMaxChunkSize(httpConfiguration.limits.maxChunkSize.asBigInteger().intValueExact());
-        options.setMaxFormAttributeSize(httpConfiguration.limits.maxFormAttributeSize.asBigInteger().intValueExact());
-        options.setWebSocketSubProtocols(websocketSubProtocols);
+
+        applyCommonOptions(options, httpConfiguration, websocketSubProtocols);
+
         return options;
     }