File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 7
7
8
8
http {
9
9
include mime.types;
10
+ # Threat files with a unknown filetype as binary
10
11
default_type application/octet-stream;
11
12
12
13
log_format main_timed '$remote_addr - $remote_user [$time_local ] "$request " '
@@ -19,14 +20,18 @@ http {
19
20
20
21
keepalive_timeout 65 ;
21
22
23
+ # Hide headers that identify the server to prevent information leakage
24
+ proxy_hide_header X-Powered-By;
25
+ fastcgi_hide_header X-Powered-By;
22
26
server_tokens off ;
23
27
24
28
# Enable gzip compression
25
29
gzip on ;
26
30
gzip_disable "msie6" ;
27
31
gzip_proxied any;
28
-
29
- gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/javascript;
32
+ # Based on CloudFlare's recommended settings
33
+ 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;
34
+ gzip_vary on ;
30
35
31
36
# Forward the cloudfront scheme from upstream
32
37
map "$http_cloudfront_forwarded_proto$http_x_forwarded_proto " $forwarded_scheme {
You can’t perform that action at this time.
0 commit comments