From 9ed7abde0ef6af16a43110b5e63911145ab4c2fe Mon Sep 17 00:00:00 2001 From: keyan Date: Wed, 6 Oct 2021 20:26:57 -0700 Subject: [PATCH] do gzip compression in nginx --- .platform/nginx/conf.d/elasticbeanstalk/00_application.conf | 1 + next.config.js | 1 + 2 files changed, 2 insertions(+) diff --git a/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf b/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf index b66c026e..4a827db1 100644 --- a/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf +++ b/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf @@ -1,4 +1,5 @@ listen 443 default_server; +gzip on; location / { set $redirect 0; if ($server_port != 443) { diff --git a/next.config.js b/next.config.js index e4de11dd..f588ef91 100644 --- a/next.config.js +++ b/next.config.js @@ -2,6 +2,7 @@ const { withPlausibleProxy } = require('next-plausible') const { RuntimeSources } = require('/opt/elasticbeanstalk/deployment/app_version_manifest.json') // eslint-disable-line module.exports = withPlausibleProxy()({ + compress: false, generateBuildId: async () => { // use the app version which eb doesn't otherwise give us // as the build id