SO_REUSEPORT support

This commit is contained in:
DarthSim
2019-06-27 14:00:39 +06:00
parent 435e5d4063
commit c76696caf7
7 changed files with 62 additions and 9 deletions

View File

@@ -136,6 +136,7 @@ type config struct {
Concurrency int
MaxClients int
TTL int
SoReuseport bool
MaxSrcDimension int
MaxSrcResolution int
@@ -258,6 +259,8 @@ func configure() {
intEnvConfig(&conf.TTL, "IMGPROXY_TTL")
boolEnvConfig(&conf.SoReuseport, "IMGPROXY_SO_REUSEPORT")
intEnvConfig(&conf.MaxSrcDimension, "IMGPROXY_MAX_SRC_DIMENSION")
megaIntEnvConfig(&conf.MaxSrcResolution, "IMGPROXY_MAX_SRC_RESOLUTION")
intEnvConfig(&conf.MaxSrcFileSize, "IMGPROXY_MAX_SRC_FILE_SIZE")