deepkit / deepkit-framework

A new full-featured and high-performance TypeScript framework
https://deepkit.io/
MIT License
3.18k stars 121 forks source link

HTTP: compression should not be enabled by default #592

Open alpharder opened 2 months ago

alpharder commented 2 months ago

The worst task JS could do is compression. It's usually better handled by ingress servers such as Nginx, Caddy or Traefik.

I would ditch compression from the framework completely or it should be at least disabled by default.

See FrameworkConfig,

    /**
     * The compression level to use when using the zlib module.
     * 0 means no compression, and 9 is the maximum compression.
     */
    compression: number = 6;
marcj commented 2 months ago

it's fine, not everyone needs a reverse proxy and has low load, for these use-cases we keep it