cleanups
This commit is contained in:
53
angie.conf
53
angie.conf
@@ -51,25 +51,58 @@ http {
|
||||
# OCSP Stapling
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
resolver 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 valid=60s;
|
||||
resolver 127.0.0.1 1.1.1.1 1.0.0.1 8.8.8.8 8.8.4.4 valid=10s status_zone=default_resolver;
|
||||
resolver_timeout 2s;
|
||||
|
||||
brotli off;
|
||||
brotli_comp_level 6;
|
||||
brotli_static on;
|
||||
brotli_types *;
|
||||
map $sent_http_content_type $compressible_type {
|
||||
default 0;
|
||||
~*text/plain 1;
|
||||
~*text/css 1;
|
||||
~*text/xml 1;
|
||||
~*text/javascript 1;
|
||||
~*application/javascript 1;
|
||||
~*application/x-javascript 1;
|
||||
~*application/json 1;
|
||||
~*application/xml 1;
|
||||
~*application/xml\+rss 1;
|
||||
~*application/rss\+xml 1;
|
||||
~*image/svg\+xml 1;
|
||||
~*font/truetype 1;
|
||||
~*font/opentype 1;
|
||||
~*font/woff 1;
|
||||
~*font/woff2 1;
|
||||
~*application/font-woff 1;
|
||||
~*application/font-woff2 1;
|
||||
}
|
||||
|
||||
# Brotli compression
|
||||
brotli on;
|
||||
brotli_static on;
|
||||
brotli_comp_level 6;
|
||||
brotli_min_length 1000;
|
||||
brotli_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss application/rss+xml image/svg+xml font/truetype font/opentype font/woff font/woff2 application/font-woff application/font-woff2;
|
||||
|
||||
# Zstd compression
|
||||
zstd on;
|
||||
zstd_min_length 256; # no less than 256 bytes
|
||||
zstd_comp_level 3; # set the level to 3
|
||||
zstd_comp_level 3;
|
||||
zstd_min_length 256;
|
||||
zstd_types text/plain text/css text/xml text/javascript application/javascript application/x-javascript application/json application/xml application/xml+rss application/rss+xml image/svg+xml font/truetype font/opentype font/woff font/woff2 application/font-woff application/font-woff2;
|
||||
|
||||
# Gzip compression
|
||||
gzip on;
|
||||
gzip_vary on;
|
||||
gzip_proxied any;
|
||||
gzip_comp_level 6;
|
||||
gzip_min_length 1000;
|
||||
gzip_types text/plain text/css text/xml text/javascript application/javascript application/x-javasc
|
||||
|
||||
# Load configs
|
||||
include /etc/angie/conf.d/*.conf;
|
||||
include /etc/angie/sites-enabled/*;
|
||||
more_clear_headers "Server";
|
||||
|
||||
set_real_ip_from 127.0.0.1; # Zaufane IP (np. Varnish lub inny proxy)
|
||||
real_ip_header X-Forwarded-For; # Użyj nagłówka X-Forwarded-For do określenia prawdziwego IP
|
||||
real_ip_recursive on; # Uwzględnij wszystkie adresy IP w X-Forwarded-For
|
||||
set_real_ip_from 127.0.0.1;
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_recursive on;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user