kt-event-marketing-fe/next.config.js
merrycoral ddc7bc143f CORS 에러 해결 및 Event API Mock 구현
- next.config.js: Event API 프록시 설정 추가 (8080 포트)
- eventApi.ts: 개발 환경에서 상대 경로 사용하도록 수정
- Mock API 추가: /api/v1/events/objectives (백엔드 준비 전 임시)
2025-10-29 17:49:50 +09:00

32 lines
778 B
JavaScript

/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
compiler: {
emotion: true,
},
images: {
domains: ['localhost', 'blobkteventstorage.blob.core.windows.net'],
formats: ['image/webp', 'image/avif'],
},
env: {
NEXT_PUBLIC_API_URL: process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080',
},
// CORS 우회를 위한 API Proxy 설정
async rewrites() {
return [
{
source: '/api/proxy/:path*',
destination: 'http://localhost:8084/api/:path*',
},
// Event Service API Proxy (8080 포트)
{
source: '/api/v1/events/:path*',
destination: 'http://localhost:8080/api/v1/events/:path*',
},
]
},
}
module.exports = nextConfig