kt-event-marketing-fe/next.config.js

37 lines
1006 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*',
},
// Participation Service API Proxy (외부 서버)
{
source: '/api/v1/participations/:path*',
destination: 'http://kt-event-marketing-api.20.214.196.128.nip.io/api/v1/participations/:path*',
},
]
},
}
module.exports = nextConfig