ktorio / ktor-plugin-registry

Maintains a repository of all Ktor plugins
Apache License 2.0
53 stars 15 forks source link

Compression example has bad settings #108

Closed ewanmellor closed 1 month ago

ewanmellor commented 3 months ago

From here:

https://github.com/ktorio/ktor-plugin-registry/blob/11936408af80297c11f28d5a9f85dd80780a592b/plugins/server/io.ktor/compression/2.0/install.kt#L10

    install(Compression) {
        gzip {
            priority = 1.0
        }
        deflate {
            priority = 10.0
            minimumSize(1024) // condition
        }
    }

These settings are not good out-of-the-box choices, and should not be going into people's new projects this way. Taking the defaults from the plugin is much more sensible:

    install(Compression)