The compression
keyword enables you to define if the application router compresses text resources before sending them.
By default, resources larger than 1KB are compressed. If you need to change the compression size threshold, for example, to “2048 bytes”, you can add the optional property “minSize”
: <size_in_KB>, as illustrated in the following example.
{ "compression": { "minSize": 2048 } }
You can disable compression in the following ways:
-
Global
Within the compression section add "enabled": false
-
Front end
The client sends a header “
Accept-Encoding
” which does not include “gzip
”. -
Back end
The application sends a header “
Cache-Control
” with the “no-transform
” directive.
Application Router: Compression Properties
Property |
Type |
Mandatory |
Description |
---|---|---|---|
|
Number |
No |
Text resources larger than this size will be compressed. |
|
Boolean |
No |
Globally disables or enables compression. The default value is true. |
|
Boolean |
No |
Determines whether response content of the multipart / mixed content type should be compressed. The default value is |
If the <COMPRESSION> environment variable is set it will overwrite any existing values.