ZIO HTTP configuration for max request size

680 views Asked by At

I want to upload a file using ZIO HTTP, but it gives 413 code, the payload is too large.
I can't figure out how to change the configuration of the underlying Netty server to fix the issue.

Any help would be appreciated.

1

There are 1 answers

0
RB_ On BEST ANSWER

After looking at the source code I have figured it out:

private val server =
    Server.port(8090) ++
    Server.maxRequestSize(maxRequestSize) ++
    Server.app(routes)