mirror of
https://github.com/gofiber/fiber.git
synced 2025-02-24 14:44:11 +00:00
Merge pull request #893 from r-52/r-compress-dont-use-magic-numbers
♻️ compression: avoid magic numbers in compression level check
This commit is contained in:
commit
47f866fc80
@ -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