From e1da0e91ce093ab1c6c512a7f91aa4a4c6cf8198 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Sat, 13 Sep 2025 17:34:47 +0500 Subject: [PATCH 1/3] exp: disable CDN, cache and image optimization --- .github/workflows/staging-env-docker-build-and-push.yml | 2 +- next.config.mjs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/staging-env-docker-build-and-push.yml b/.github/workflows/staging-env-docker-build-and-push.yml index 689d8b8c..ca554603 100644 --- a/.github/workflows/staging-env-docker-build-and-push.yml +++ b/.github/workflows/staging-env-docker-build-and-push.yml @@ -16,7 +16,7 @@ jobs: prefix: "small-env" # Build-args used to define variables that will be used in image build-args: | - CDN_ENABLED=true + CDN_ENABLED=false CDN_DOMAIN=cdn.small.chelzoo.tech CORS_ORIGIN=https://small.chelzoo.tech # without this it cannot login to the registry diff --git a/next.config.mjs b/next.config.mjs index a4055031..166d053e 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -14,7 +14,7 @@ const nextConfig = { headers: [ { key: "Cache-Control", - value: "public, max-age=31536000, immutable" + value: "public, no-cache" } ] }, @@ -159,11 +159,11 @@ const nextConfig = { domains: [process.env.CDN_DOMAIN], path: `https://${process.env.CDN_DOMAIN}/_next/image` }), - + unoptimized: true, // lifetime in seconds for cached optimized images // https://nextjs.org/docs/pages/api-reference/components/image#minimumcachettl // 7 days - minimumCacheTTL: 604800, + minimumCacheTTL: 0, formats: ['image/avif', 'image/webp'], remotePatterns: [ { From bd284ba11bc9fb4b605d2f1b5bd28335fea637c9 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Sat, 13 Sep 2025 17:45:23 +0500 Subject: [PATCH 2/3] exp: enable optimization --- next.config.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/next.config.mjs b/next.config.mjs index 166d053e..fd552ed6 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -159,7 +159,6 @@ const nextConfig = { domains: [process.env.CDN_DOMAIN], path: `https://${process.env.CDN_DOMAIN}/_next/image` }), - unoptimized: true, // lifetime in seconds for cached optimized images // https://nextjs.org/docs/pages/api-reference/components/image#minimumcachettl // 7 days From 137bcfb37f70e092d6fb791e3afe530cbbcc6a17 Mon Sep 17 00:00:00 2001 From: Yam1x Date: Sat, 13 Sep 2025 17:49:36 +0500 Subject: [PATCH 3/3] exp: enable CDN --- .github/workflows/staging-env-docker-build-and-push.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/staging-env-docker-build-and-push.yml b/.github/workflows/staging-env-docker-build-and-push.yml index ca554603..689d8b8c 100644 --- a/.github/workflows/staging-env-docker-build-and-push.yml +++ b/.github/workflows/staging-env-docker-build-and-push.yml @@ -16,7 +16,7 @@ jobs: prefix: "small-env" # Build-args used to define variables that will be used in image build-args: | - CDN_ENABLED=false + CDN_ENABLED=true CDN_DOMAIN=cdn.small.chelzoo.tech CORS_ORIGIN=https://small.chelzoo.tech # without this it cannot login to the registry