Skip to content

Commit

Permalink
Enable gzip for wccd
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Oct 19, 2023
1 parent b11c451 commit 756d83b
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/wCCD/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ RUN if [ "$NETWORK" = "mainnet" ]; then yarn build:prod; fi

FROM nginx
COPY --from=build ./app/dist ./usr/share/nginx/html
COPY ./nginx.conf /etc/nginx/conf.d/default.conf
37 changes: 37 additions & 0 deletions examples/wCCD/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Enable Gzip
gzip on;
gzip_http_version 1.0;
gzip_comp_level 2;
gzip_min_length 1100;
gzip_buffers 4 8k;
gzip_proxied any;
gzip_types
text/css
text/javascript
text/xml
text/plain
text/x-component
application/javascript
application/json
application/xml
application/rss+xml
font/truetype
font/opentype
application/vnd.ms-fontobject
image/svg+xml;

gzip_static on;

gzip_proxied expired no-cache no-store private auth;
gzip_disable "MSIE [1-6]\.";
gzip_vary on;

server {
listen 80 default;
server_name _;

location / {
root /usr/share/nginx/html;
try_files $uri /index.html;
}
}

0 comments on commit 756d83b

Please sign in to comment.