HttpCompressionOptions

HTTP compression configurations.

enabledbooleanOptional
Whether HTTP compression is enabled. By default, it's false.
levelnumberOptional
The level of zlib compression to apply to responses. A higher level will result in better compression but will take longer to complete. A lower level will result in less compression but will be much faster. The default value is 6.
memLevelnumberOptional
How much memory should be allocated to the internal compression state. It's an integer in the range of 1 (minimum level) and 9 (maximum level). The default value is 8.
thresholdstring | numberOptional
The minimum response body size that compression is applied on. Its value can be the number of bytes or any string accepted by the bytes module. The default value is 1024.
Was this page helpful?
Edit this page
Ask Anything
FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break