Skip to content

Commit af07a24

Browse files
committed
Ref #36099: fix upload after undertow update
1 parent a8f065a commit af07a24

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/ContainerProxyApplication.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import eu.openanalytics.containerproxy.util.LoggingConfigurer;
3131
import eu.openanalytics.containerproxy.util.ProxyMappingManager;
3232
import io.undertow.Handlers;
33+
import io.undertow.UndertowOptions;
3334
import io.undertow.server.handlers.SameSiteCookieHandler;
3435
import io.undertow.servlet.api.ServletSessionConfig;
3536
import io.undertow.servlet.api.SessionManagerFactory;
@@ -338,6 +339,12 @@ public UndertowServletWebServerFactory servletContainer() {
338339
throw new IllegalArgumentException("Invalid bind address specified", e);
339340
}
340341
factory.setPort(Integer.parseInt(environment.getProperty("proxy.port", "8080")));
342+
factory.addBuilderCustomizers(builder -> {
343+
// allow uploads of unlimited size
344+
builder.setServerOption(UndertowOptions.MAX_ENTITY_SIZE, -1L);
345+
// limit parsing of multipart requests to 2MB (see #36099), multipart requests are not used in ShinyProxy
346+
builder.setServerOption(UndertowOptions.MULTIPART_MAX_ENTITY_SIZE, 2097152L);
347+
});
341348
return factory;
342349
}
343350

0 commit comments

Comments
 (0)