diff --git a/.env.production b/.env.production index 2ac8054f..027e025e 100644 --- a/.env.production +++ b/.env.production @@ -1,7 +1,7 @@ # ============================================== # API Configuration # ============================================== -API_URL=https://api.codebridge-x.com +NEXT_PUBLIC_API_URL=https://api.codebridge-x.com # Frontend URL (for CORS) NEXT_PUBLIC_FRONTEND_URL=https://dev.codebridge-x.com @@ -18,5 +18,10 @@ NEXT_PUBLIC_AUTH_MODE=sanctum # 개발용 고정 키 (주기적 갱신 예정) # 발급일: 2025-11-07 # 갱신 필요 시: PHP 백엔드 팀에 새 키 요청 -# NEXT_PUBLIC_ 접두사: 클라이언트에서 접근 가능 -NEXT_PUBLIC_API_KEY=42Jfwc6EaRQ04GNRmLR5kzJp5UudSOzGGqjmdk1a +# ✅ 서버 전용 (클라이언트에 노출되지 않음) +API_KEY=42Jfwc6EaRQ04GNRmLR5kzJp5UudSOzGGqjmdk1a + +# ============================================== +# Google Maps API Key +# ============================================== +NEXT_PUBLIC_GOOGLE_MAPS_API_KEY=AIzaSyAS3bAzmXlhhZHgO3buFiTGzavXZ6ubYq8 \ No newline at end of file diff --git a/src/app/[locale]/(protected)/layout.tsx b/src/app/[locale]/(protected)/layout.tsx index b53eb0f4..27efc25e 100644 --- a/src/app/[locale]/(protected)/layout.tsx +++ b/src/app/[locale]/(protected)/layout.tsx @@ -35,11 +35,14 @@ export default function ProtectedLayout({ // 🎨 모든 하위 페이지에 공통 레이아웃 및 Context 적용 // 🚨 ApiErrorProvider: Server Action 401 에러 시 자동 로그인 리다이렉트 + // 📱 FCMProvider: Capacitor 네이티브 앱에서 FCM 푸시 알림 초기화 return ( - - {children} - + + + {children} + + ); } \ No newline at end of file diff --git a/src/lib/capacitor/fcm.ts b/src/lib/capacitor/fcm.ts index 4d12ba06..1c645908 100644 --- a/src/lib/capacitor/fcm.ts +++ b/src/lib/capacitor/fcm.ts @@ -40,7 +40,8 @@ declare global { const CONFIG = { // Next.js 프록시 경로 (HttpOnly 쿠키 자동 포함) - proxyBasePath: '/api/proxy/v1', + // NOTE: /api/proxy 사용 - 프록시가 자동으로 /api/v1/ 추가함 + proxyBasePath: '/api/proxy', fcmTokenKey: 'fcm_token', soundBasePath: '/sounds/', defaultSound: 'default',