mirror of
https://github.com/gofiber/fiber.git
synced 2025-05-30 19:33:01 +00:00
♻️ compression: avoid magic numbers in compression level check
Avoid the magic numbers to make it easier to read
This commit is contained in:
parent
e090f5278a
commit
6e72025b6c
@ -46,7 +46,7 @@ func New(config ...Config) fiber.Handler {
|
||||
cfg = config[0]
|
||||
|
||||
// Set default values
|
||||
if cfg.Level < -1 || cfg.Level > 2 {
|
||||
if cfg.Level < LevelDisabled || cfg.Level > LevelBestCompression {
|
||||
cfg.Level = ConfigDefault.Level
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user