Open jprakashbabu opened 4 weeks ago
Hi @jprakashbabu. Dropwizard 2.1.11 and the provided Jetty version 9.4.53 are out of support, so please migrate to a more recent Dropwizard version. In general, we won't provide full support for versions announced to be EOL. The correct place would be the discussion board. Please don't raise a discussion and an issue, usually only one option fits :wink:
That being said, I don't see an issue here. When using your include list
server:
gzip:
enabled: true
compressedMimeTypes:
- text/html
- text/xml
- application/x-javascript
- text/javascript
- text/css
my JS file gets compressed correctly.
Can you please let me know if I am missing something here (or) is the exclude list taking precedence over the include ?
When checking, if the MIME-type should be compressed, Jetty first evaluates the include list and then additionally validates, that the type is not in the exclude list. The default exclude list however doesn't list application/x-javascript
as an excluded MIME-type.
Hi,
I am using dropwizard 2.1.11 and enabled compression for certain mime types using the configuration option compressedMimeTypes as shown below.
compressedMimeTypes : text/html,text/xml,application/x-javascript,text/javascript,text/css
and see that application/x-javascript is not getting compressed even though its there in the listHowever if I don't specify any compressedMimeTypes and leave the default values to get picked up, application/x-javascript gets compressed (Content-Encoding: gzip)
PS: Both the above requests were identical and had Accept-Encoding:gzip, deflate, br, zstd
thanks, Prakash