Upgrading to 0.8
0.8 compresses API responses of 1 KiB or more with gzip or deflate, and with zstd when its Ktor module is on the classpath.
Apps that install Ktor's Compression themselves
Nothing changes. When Compression is already installed, ktor-svelte leaves it alone and uses your configuration. To let ktor-svelte handle API paths instead, remove your installation.
To keep API responses uncompressed, turn it off:
install(Svelte) {
apiCompression = false
}Endpoints that return secrets
A response that mixes a secret, such as an API key, with text an attacker can choose can leak the secret through its compressed size. If you have such an endpoint, turn apiCompression off, or install Compression yourself with a condition that skips that route. See API compression.
Proxies and tests
Clients that send Accept-Encoding now get a compressed body with Content-Encoding. Browsers and Ktor's client handle this on their own. Tests that read raw bytes, or proxies that rewrite bodies, may need to decompress first or send no Accept-Encoding.