File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 8
8
9
9
http {
10
10
include mime.types;
11
+ # Threat files with a unknown filetype as binary
11
12
default_type application/octet-stream;
12
13
13
14
# Define custom log format to include reponse times
@@ -28,15 +29,16 @@ http {
28
29
uwsgi_temp_path /tmp/uwsgi_temp;
29
30
scgi_temp_path /tmp/scgi_temp;
30
31
31
- # Hardening
32
+ # Hide headers that identify the server to prevent information leakage
32
33
proxy_hide_header X-Powered-By;
33
34
fastcgi_hide_header X-Powered-By;
34
35
server_tokens off ;
35
36
36
37
# Enable gzip compression by default
37
38
gzip on ;
38
39
gzip_proxied any;
39
- gzip_types text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;
40
+ # Based on CloudFlare's recommended settings
41
+ gzip_types text/richtext text/plain text/css text/x-script text/x-component text/x-java-source text/x-markdown application/javascript application/x-javascript text/javascript text/js image/x-icon image/vnd.microsoft.icon application/x-perl application/x-httpd-cgi text/xml application/xml application/rss+xml application/vnd.api+json application/x-protobuf application/json multipart/bag multipart/mixed application/xhtml+xml font/ttf font/otf font/x-woff image/svg+xml application/vnd.ms-fontobject application/ttf application/x-ttf application/otf application/x-otf application/truetype application/opentype application/x-opentype application/font-woff application/eot application/font application/font-sfnt application/wasm application/javascript-binast application/manifest+json application/ld+json application/graphql+json application/geo+json;
40
42
gzip_vary on ;
41
43
gzip_disable "msie6" ;
42
44
You can’t perform that action at this time.
0 commit comments