kumuluz / kumuluzee

Lightweight open-source framework for developing microservices using standard Java EE technologies and migrating Java EE to cloud-native architecture.
https://ee.kumuluz.com
MIT License
291 stars 71 forks source link

Add gzip compression option for jetty #166

Closed flavienlaurent closed 4 years ago

flavienlaurent commented 4 years ago

Hello :)

I added an option (kumuluzee.server.http.use-gzip) to be able to active gzip compression on demand for Jetty via GzipHandler mechanism.

It makes a huge difference when working on big payload Rest API.

Tell me if you want to be able to configure more deeply the GzipHandler or anything else.

Have a nice day!

Flavien

MBJuric commented 4 years ago

Hi, Thanks for you contribution. I hope you are well. Best regards Matjaz

jmezna commented 4 years ago

@flavienlaurent, can you please add support for configuration keys as described here.

flavienlaurent commented 4 years ago

@jmezna thanks for the review

just to be sure, you mean those ones: minGzipSize checkGzExists (Deprecated) includedMethods includedMimeTypes excludedMimeTypes excludedAgentPatterns excludedPaths includedPaths includePaths

jmezna commented 4 years ago

Yes

flavienlaurent commented 4 years ago
kumuluzee:
    server:
        gzip:
            enabled: true
            included-methods:
                - POST
                - GET
(...)

Tell me if you need anything else or if this is not what you expected ;)

Have a nice day

MBJuric commented 4 years ago

@flavienlaurent thank you for your contribution!