Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
[RFR-162] Enable compression (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
hb0 authored Nov 11, 2022
1 parent 27418c8 commit 4d4bb26
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion api/src/main/java/de/cyface/api/HttpServer.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
*/
package de.cyface.api;

import io.vertx.core.http.HttpServerOptions;
import org.apache.commons.lang3.Validate;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -64,7 +65,9 @@ public void start(final Vertx vertx, final Router router, final Promise<Void> st
Validate.notNull(router);
Validate.notNull(startPromise);

vertx.createHttpServer().requestHandler(router).listen(port,
final var options = new HttpServerOptions();
options.setCompressionSupported(true);
vertx.createHttpServer(options).requestHandler(router).listen(port,
serverStartup -> completeStartup(serverStartup, startPromise));
}

Expand Down

0 comments on commit 4d4bb26

Please sign in to comment.