Skip to content

Commit 0a56907

Browse files
committed
add nginx brotli
1 parent 488f09e commit 0a56907

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

nginx/dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ LABEL maintainer="Ayhan Akilli"
33

44
RUN apk add --no-cache \
55
nginx \
6+
nginx-mod-http-brotli \
67
nginx-mod-http-geoip \
78
nginx-mod-http-image-filter \
89
openssl && \

nginx/etc/nginx.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ http {
1515
add_header X-Content-Type-Options nosniff;
1616
add_header X-Frame-Options sameorigin;
1717
add_header X-Xss-Protection "1; mode=block";
18+
brotli on;
19+
brotli_comp_level 6;
20+
brotli_static on;
21+
brotli_types application/atom+xml application/javascript application/json application/vnd.api+json application/rss+xml
22+
application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
23+
application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
24+
font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
25+
image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
1826
chunked_transfer_encoding on;
1927
client_max_body_size 0;
2028
default_type application/octet-stream;

0 commit comments

Comments
 (0)