feat: 공개 배포 번들 검사로 실제 병원명·비밀 키가 있으면 빌드를 실패시킨다
webforai.kr 빌드 결과에서 실제 병원명·도메인, Google·Supabase 키, reports/·assets/clients/ 파일을 찾으면 빌드를 멈춰 Vercel 배포가 진행되지 않게 한다. 목록은 plugins/public-bundle-denylist.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f1f8e6f6e4
commit
6b387c130c
3 files changed
+106
No files matched your search
@@ -4,6 +4,7 @@ import fs from 'fs';
|
||||
import path from 'path';
|
||||
import {defineConfig, loadEnv} from 'vite';
|
||||
import { supabaseSync } from './plugins/vite-plugin-supabase-sync';
|
||||
import { assertPublicBundleClean } from './plugins/vite-plugin-public-bundle-guard';
|
||||
|
||||
export default defineConfig(({mode}) => {
|
||||
const env = loadEnv(mode, '.', '');
|
||||
@@ -88,6 +89,9 @@ export default defineConfig(({mode}) => {
|
||||
const src = path.resolve(out, from);
|
||||
if (fs.existsSync(src)) fs.copyFileSync(src, path.resolve(out, to));
|
||||
}
|
||||
// 정리가 끝난 결과물을 검사한다. 실제 병원명·비밀 키가 남아 있으면 빌드를 실패시켜 배포를 막는다.
|
||||
// writeBundle 은 플러그인끼리 병렬로 돌 수 있어 별도 플러그인이 아니라 여기서 정리 뒤에 부른다.
|
||||
assertPublicBundleClean(out);
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user