From 808d23bd15c1b0c5b122a8b732473dd797f63ab1 Mon Sep 17 00:00:00 2001 From: Henry Date: Thu, 5 Jun 2025 12:58:01 +0100 Subject: [PATCH] fix: add google to the remote patterns --- README.md | 2 +- apps/web/next.config.js | 11 ++++++++++- apps/web/public/__ENV.js | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f9db4b0e..4ce3c6b5 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ pnpm dev | `S3_ACCESS_KEY_ID` | S3 access key | For file uploads | `xxx` | | `S3_SECRET_ACCESS_KEY` | S3 secret key | For file uploads | `xxx` | | `NEXT_PUBLIC_STORAGE_URL` | Storage service URL | For file uploads | `https://storage.kanbn.com` | -| `NEXT_PUBLIC_STORAGE_DOMAIN` | Storage domain name | For file uploads | `storage.kanbn.com` | +| `NEXT_PUBLIC_STORAGE_DOMAIN` | Storage domain name | For file uploads | `kanbn.com` | | `NEXT_PUBLIC_AVATAR_BUCKET_NAME` | S3 bucket name for avatars | For file uploads | `avatars` | See `.env.example` for a complete list of supported environment variables. diff --git a/apps/web/next.config.js b/apps/web/next.config.js index 295d9485..25400187 100644 --- a/apps/web/next.config.js +++ b/apps/web/next.config.js @@ -26,7 +26,16 @@ const config = { typescript: { ignoreBuildErrors: true }, images: { - domains: [env("NEXT_PUBLIC_STORAGE_DOMAIN") ?? ""], + remotePatterns: [ + { + protocol: "https", + hostname: `*.${env("NEXT_PUBLIC_STORAGE_DOMAIN")}`, + }, + { + protocol: "https", + hostname: "*.googleusercontent.com", + }, + ], }, experimental: { instrumentationHook: true, diff --git a/apps/web/public/__ENV.js b/apps/web/public/__ENV.js index 8bd6b347..63d887ed 100644 --- a/apps/web/public/__ENV.js +++ b/apps/web/public/__ENV.js @@ -1 +1 @@ -window.__ENV = {"NEXT_PUBLIC_UMAMI_ID":"aaed1f55-25e2-4223-b918-e429c390be35","NEXT_PUBLIC_KAN_ENV":"cloud","NEXT_PUBLIC_BASE_URL":"http://localhost:3000","NEXT_PUBLIC_AVATAR_BUCKET_NAME":"avatars","NEXT_PUBLIC_STORAGE_DOMAIN":"storage.kanbn.com","NEXT_PUBLIC_STORAGE_URL":"https://storage.kanbn.com"}; \ No newline at end of file +window.__ENV = {"NEXT_PUBLIC_UMAMI_ID":"aaed1f55-25e2-4223-b918-e429c390be35","NEXT_PUBLIC_KAN_ENV":"cloud","NEXT_PUBLIC_BASE_URL":"http://localhost:3000","NEXT_PUBLIC_AVATAR_BUCKET_NAME":"avatars","NEXT_PUBLIC_STORAGE_DOMAIN":"kanbn.com","NEXT_PUBLIC_STORAGE_URL":"https://storage.kanbn.com"}; \ No newline at end of file