Change MaxConnsPerIP to 0 to fix too many connections from HAProxy (#77)

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/77
Reviewed-by: 6543 <6543@noreply.codeberg.org>
Co-authored-by: Moritz Marquardt <momar@noreply.codeberg.org>
Co-committed-by: Moritz Marquardt <momar@noreply.codeberg.org>
This commit is contained in:
Moritz Marquardt 2022-05-14 22:29:54 +02:00 committed by 6543
parent 2dbc66d052
commit b2ca888050

View File

@ -18,12 +18,10 @@ func SetupServer(handler fasthttp.RequestHandler) *fasthttp.Server {
return &fasthttp.Server{
Handler: compressedHandler,
DisablePreParseMultipartForm: true,
MaxRequestBodySize: 0,
NoDefaultServerHeader: true,
NoDefaultDate: true,
ReadTimeout: 30 * time.Second, // needs to be this high for ACME certificates with ZeroSSL & HTTP-01 challenge
Concurrency: 1024 * 32, // TODO: adjust bottlenecks for best performance with Gitea!
MaxConnsPerIP: 100,
}
}