Micronaut Server Compression

Micronaut 3.9.4 does not support disabling compression in HTTP server responses.Â  There is a workaround though.Â Â
Create a CustomHttpCompressionStrategy bean
@Primary
@Singleton
public class CustomHttpCompressionStrategy implements HttpCompressionStrategy {
public boolean shouldCompress(io.netty.handler.codec.http.HttpResponse response) {Â
return false;
}Â
public int getCompressionLevel() {
return 0;
}
}