mirror of https://github.com/gofiber/fiber.git
Add new config option
parent
856537ef01
commit
e7c1b3e5e2
1
ctx.go
1
ctx.go
|
@ -1555,6 +1555,7 @@ func (c *DefaultCtx) SendFile(file string, config ...SendFile) error {
|
|||
AcceptByteRange: cfg.ByteRange,
|
||||
Compress: cfg.Compress,
|
||||
CompressBrotli: cfg.Compress,
|
||||
CompressZstd: cfg.Compress,
|
||||
CompressedFileSuffixes: c.app.config.CompressedFileSuffixes,
|
||||
CacheDuration: cfg.CacheDuration,
|
||||
SkipCache: cfg.CacheDuration < 0,
|
||||
|
|
|
@ -66,6 +66,7 @@ func New(root string, cfg ...Config) fiber.Handler {
|
|||
AcceptByteRange: config.ByteRange,
|
||||
Compress: config.Compress,
|
||||
CompressBrotli: config.Compress, // Brotli compression won't work without this
|
||||
CompressZstd: config.Compress, // Zstd compression won't work without this
|
||||
CompressedFileSuffixes: c.App().Config().CompressedFileSuffixes,
|
||||
CacheDuration: config.CacheDuration,
|
||||
SkipCache: config.CacheDuration < 0,
|
||||
|
|
Loading…
Reference in New Issue