Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const nextConfig = {
remotePatterns: [
{ protocol: 'https', hostname: 'velog.velcdn.com', pathname: '**' },
{ protocol: 'https', hostname: 'images.velog.io', pathname: '**' },
{ protocol: 'http', hostname: 'localhost', pathname: '**' },
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

프로덕션 환경에서 localhost 패턴이 활성화되지 않도록 확인하세요.

HTTP localhost 패턴은 개발 환경에서만 필요합니다. 프로덕션 배포 시 보안 취약점이 될 수 있으므로, 환경 변수를 사용하여 개발 환경에서만 활성화되도록 제한하는 것을 권장합니다.

다음과 같이 수정하는 것을 고려하세요:

  images: {
    remotePatterns: [
      { protocol: 'https', hostname: 'velog.velcdn.com', pathname: '**' },
      { protocol: 'https', hostname: 'images.velog.io', pathname: '**' },
-      { protocol: 'http', hostname: 'localhost', pathname: '**' },
+      ...(process.env.NODE_ENV === 'development' 
+        ? [{ protocol: 'http', hostname: 'localhost', pathname: '**' }]
+        : []),
    ],
  },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{ protocol: 'http', hostname: 'localhost', pathname: '**' },
...(process.env.NODE_ENV === 'development'
? [{ protocol: 'http', hostname: 'localhost', pathname: '**' }]
: []),
🤖 Prompt for AI Agents
In next.config.mjs around line 26, the images remotePatterns entry allows
protocol:'http' hostname:'localhost' which should only be enabled in
development; modify the config to add the localhost/http pattern conditionally
based on an environment variable (e.g. process.env.NODE_ENV === 'development' or
a specific DEV flag) so that the localhost pattern is included only when that
flag is true, keeping production config free of the localhost entry and ensuring
remotePatterns is built from a base array plus the conditional localhost
pattern.

],
},
};
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@sentry/nextjs": "^8.47.0",
"@tailwindcss/typography": "^0.5.16",
"@tanstack/react-query": "^5.69.0",
"@vercel/og": "^0.8.6",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

@vercel/og 패키지 버전 확인 필요

@vercel/og의 최신 버전은 0.8.5입니다. package.json의 ^0.8.6 버전 지정이 실제 존재하는 버전과 맞지 않습니다. ^0.8.6는 0.8.6 이상 0.9.0 미만의 버전을 요구하는데, 현재 0.8.6은 NPM 레지스트리에 공개되지 않았습니다. 버전을 ^0.8.5로 수정하거나 최신 버전이 릴리스되었는지 확인하세요.

🤖 Prompt for AI Agents
package.json around line 31: the dependency "@vercel/og": "^0.8.6" references a
non-existent 0.8.6 release; change it to a valid published version (e.g.,
"@vercel/og": "^0.8.5") or query the npm registry for the actual latest tag and
update the version range accordingly, then run your package manager
(npm/yarn/pnpm) to install and verify the lockfile updates.

"chart.js": "^4.4.7",
"chartjs-plugin-datalabels": "^2.2.0",
"holy-loader": "^2.3.13",
Expand Down
Loading
Loading