Skip to content

Commit

Permalink
♻️ eb 헬스체크 origin test
Browse files Browse the repository at this point in the history
  • Loading branch information
jjikky committed Jul 15, 2024
1 parent fb07197 commit 88ebadd
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/common/modules/express/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,14 @@ module.exports = expressLoader = (app) => {
origin: (origin, callback) => {
if (
// whitelist에 있는 origin 허용
(origin && conf.corsWhiteList.indexOf(origin) !== -1) ||
// postman 허용
(!origin &&
conf.corsUserAgent.split(',').some((agent) => req.headers['user-agent'].includes(agent)))
origin === undefined ||
conf.corsWhiteList.indexOf(origin) !== -1
// NOTE : EB Health Check도 origin undefind라 거부 당해서 임시 주석처리
// // whitelist에 있는 origin 허용
// (origin && conf.corsWhiteList.indexOf(origin) !== -1) ||
// // postman 허용
// (!origin &&
// conf.corsUserAgent.split(',').some((agent) => req.headers['user-agent'].includes(agent)))
) {
return callback(null, true);
}
Expand Down

0 comments on commit 88ebadd

Please sign in to comment.