feat: Otimiza compactação com gzip_static e suporte a WASM/MJS para Pseudo-CDN

This commit is contained in:
João Pedro Toledo Goncalves 2026-02-04 20:46:44 -03:00
parent 948fefdec9
commit b86f26dc34
1 changed files with 24 additions and 44 deletions

View File

@ -1,67 +1,47 @@
# --- Pathfinder Modern Compression Stack ---
# 1. Gzip (Fallback para navegadores antigos e compatibilidade)
# 1. Gzip (Fallback e Compatibilidade)
gzip on;
gzip_static on; # Serve .gz se existir no disco (Ganho de CPU)
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_min_length 256;
gzip_types
application/atom+xml
text/plain
text/css
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
application/xml+rss
application/wasm
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
font/opentype
application/vnd.ms-fontobject
application/x-font-ttf;
# 2. Google Brotli (Próxima geração - Ativado onde suportado)
# Nota: Requer o módulo ngx_brotli compilado.
# 2. Google Brotli (Próxima Geração)
brotli on;
brotli_static on; # Serve .br se existir no disco (Alta Performance)
brotli_comp_level 6;
brotli_static on;
brotli_min_length 256;
brotli_types
application/atom+xml
text/plain
text/css
text/xml
text/javascript
application/javascript
application/x-javascript
application/json
application/ld+json
application/manifest+json
application/rss+xml
application/vnd.geo+json
application/vnd.ms-fontobject
application/x-font-ttf
application/x-web-app-manifest+json
application/xhtml+xml
application/xml
font/opentype
image/bmp
application/xml+rss
application/wasm
image/svg+xml
image/x-icon
text/cache-manifest
text/css
text/plain
text/vcard
text/vnd.rim.location.xloc
text/vtt
text/x-component
text/x-cross-domain-policy;
font/opentype
application/vnd.ms-fontobject
application/x-font-ttf;