Skip to content

Commit 6d66656

Browse files
author
sergi
committed
Add ReduceMemoryUsage option to server configuration
1 parent d94505c commit 6d66656

File tree

2 files changed

+21
-19
lines changed

2 files changed

+21
-19
lines changed

evo.config.go

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,20 @@ type Configuration struct {
6161
} `yaml:"jwt"`
6262

6363
Server struct {
64-
Host string `yaml:"host"`
65-
Port string `yaml:"port"`
66-
Cert string `yaml:"cert"`
67-
Key string `yaml:"key"`
68-
HTTPS bool `yaml:"https"`
69-
Name string `yaml:"name"`
70-
MaxUploadSize string `yaml:"max-upload-size"`
71-
StrictRouting bool `yaml:"strict-routing"`
72-
CaseSensitive bool `yaml:"case-sensitive"`
73-
RequestID bool `yaml:"request-id"`
74-
Debug bool `yaml:"debug"`
75-
Recover bool `yaml:"recover"`
76-
ProxyHeader string `yaml:"proxy-header"`
64+
Host string `yaml:"host"`
65+
Port string `yaml:"port"`
66+
Cert string `yaml:"cert"`
67+
Key string `yaml:"key"`
68+
HTTPS bool `yaml:"https"`
69+
Name string `yaml:"name"`
70+
MaxUploadSize string `yaml:"max-upload-size"`
71+
StrictRouting bool `yaml:"strict-routing"`
72+
CaseSensitive bool `yaml:"case-sensitive"`
73+
RequestID bool `yaml:"request-id"`
74+
Debug bool `yaml:"debug"`
75+
Recover bool `yaml:"recover"`
76+
ProxyHeader string `yaml:"proxy-header"`
77+
ReduceMemoryUsage bool `yaml:"reduce-memory-usage"`
7778
} `yaml:"server"`
7879

7980
Database struct {

evo.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ func Setup() {
4747
}
4848

4949
app = fiber.New(fiber.Config{
50-
Prefork: config.Tweaks.PreFork,
51-
StrictRouting: config.Server.StrictRouting,
52-
CaseSensitive: config.Server.CaseSensitive,
53-
ServerHeader: config.Server.Name,
54-
BodyLimit: int(bodySize),
55-
ProxyHeader: config.Server.ProxyHeader,
50+
Prefork: config.Tweaks.PreFork,
51+
StrictRouting: config.Server.StrictRouting,
52+
CaseSensitive: config.Server.CaseSensitive,
53+
ServerHeader: config.Server.Name,
54+
BodyLimit: int(bodySize),
55+
ProxyHeader: config.Server.ProxyHeader,
56+
ReduceMemoryUsage: config.Server.ReduceMemoryUsage,
5657
})
5758

5859
if config.CORS.Enabled {

0 commit comments

Comments
 (0)