Skip to content

Commit 7f99a3b

Browse files
authored
Merge pull request #155 from IABTechLab/aul-UID2-5077-increase-max-form-buffer-size
aul-UID2-5077-increase-max-form-buffer-size
2 parents bf9cc5e + 4f38979 commit 7f99a3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/uid2/optout/vertx/OptOutServiceVerticle.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
public class OptOutServiceVerticle extends AbstractVerticle {
4545
public static final String IDENTITY_HASH = "identity_hash";
4646
public static final String ADVERTISING_ID = "advertising_id";
47+
public static final long MAX_REQUEST_BODY_SIZE = 1 << 20; // 1MB
4748

4849
private static final Logger LOGGER = LoggerFactory.getLogger(OptOutServiceVerticle.class);
4950
private final HealthComponent healthComponent = HealthManager.instance.registerComponent("http-server");
@@ -114,7 +115,7 @@ public void start(Promise<Void> startPromise) {
114115
this.healthComponent.setHealthStatus(false, "still starting");
115116

116117
try {
117-
vertx.createHttpServer()
118+
vertx.createHttpServer(new HttpServerOptions().setMaxFormBufferedBytes((int) MAX_REQUEST_BODY_SIZE))
118119
.requestHandler(createRouter())
119120
.listen(listenPort, result -> handleListenResult(startPromise, result));
120121
} catch (Exception ex) {

0 commit comments

Comments
 (0)