From 756d83b7232331f5cda09d4316e4a87d7cf47b76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Bruus=20Zeppelin?= Date: Thu, 19 Oct 2023 07:08:27 +0200 Subject: [PATCH] Enable gzip for wccd --- examples/wCCD/Dockerfile | 1 + examples/wCCD/nginx.conf | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 examples/wCCD/nginx.conf diff --git a/examples/wCCD/Dockerfile b/examples/wCCD/Dockerfile index 024b1ba82..e97179528 100644 --- a/examples/wCCD/Dockerfile +++ b/examples/wCCD/Dockerfile @@ -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 diff --git a/examples/wCCD/nginx.conf b/examples/wCCD/nginx.conf new file mode 100644 index 000000000..2d8e944d6 --- /dev/null +++ b/examples/wCCD/nginx.conf @@ -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; + } +}