From 0eb4bba40b8e15966edd08248bbb3617f85bcb03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=9C=A0=EA=B1=B4=EC=A3=BC?= Date: Sun, 5 Jan 2025 16:52:12 +0900 Subject: [PATCH] cors domain changed --- backend/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app.js b/backend/app.js index a8717d2..d877e76 100644 --- a/backend/app.js +++ b/backend/app.js @@ -21,7 +21,7 @@ const PORT = process.env.PORT || 3000; dotenv.config(); app.use(cors({ - origin: ['http://43.203.237.161', 'http://David-kakao-community-env-front.eba-xxxxxx.elasticbeanstalk.com'], // 프론트엔드 도메인 + origin: ['http://43.203.237.161', 'http://david-kakao-community-env-front.eba-an3dmmwe.ap-northeast-2.elasticbeanstalk.com'], // 프론트엔드 도메인 credentials: true // 쿠키/세션 허용 })); @@ -55,7 +55,7 @@ app.use( '/uploads', (req, res, next) => { // 배열로 처리 - const allowedOrigins = ['http://43.203.237.161','http://david-kakao-community-env-front.eba-an3dmmwe.ap-northeast-2.elasticbeanstalk.com/']; + const allowedOrigins = ['http://43.203.237.161','http://david-kakao-community-env-front.eba-an3dmmwe.ap-northeast-2.elasticbeanstalk.com']; const origin = req.headers.origin; if (allowedOrigins.includes(origin)) {