mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-27 08:02:01 +00:00
feat: disable compressor if set to false/undefined (#4381)
This commit is contained in:
parent
4e74260ae2
commit
e4140cee04
@ -73,8 +73,8 @@ export default class Server {
|
||||
// If only setting for `compression` are provided, require the module and insert
|
||||
const compression = this.nuxt.resolver.requireModule('compression')
|
||||
this.useMiddleware(compression(compressor))
|
||||
} else {
|
||||
// Else, require own compression middleware
|
||||
} else if (compressor) {
|
||||
// Else, require own compression middleware if compressor is actually truthy
|
||||
this.useMiddleware(compressor)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user