Skip to content

Commit

Permalink
cors domain changed
Browse files Browse the repository at this point in the history
  • Loading branch information
bakgom123 committed Jan 5, 2025
1 parent dd3f1f6 commit 0eb4bba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 // 쿠키/세션 허용
}));

Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 0eb4bba

Please sign in to comment.