Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I enable gzip text compression in universal angular and nginx?

does anyone know how to enable gzip text compression in nginx and universal angular? I don't know where to start doing it

like image 778
Alex Onofre Avatar asked Sep 06 '25 03:09

Alex Onofre


1 Answers

The gzip has nothing to do with Angular, it's a server thing. In nginx you can enable it by setting gzip on;

Like below:

server {
    gzip on;
    gzip_types      text/plain application/xml;
    gzip_proxied    no-cache no-store private expired auth;
    gzip_min_length 1000;
    ...
}

See the article below for more details:

https://docs.nginx.com/nginx/admin-guide/web-server/compression/

like image 106
Nadhir Falta Avatar answered Sep 09 '25 19:09

Nadhir Falta