Skip to content

Commit

Permalink
Update Express CORS
Browse files Browse the repository at this point in the history
  • Loading branch information
heptacode committed Oct 24, 2022
1 parent 12ce8ff commit db39f0b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ DB.init(); // DB 세팅

app.set("trust proxy", "loopback"); // 프록시 설정 배포 시 ON
app.use(morgan("dev")); // 개발용 로그 미들웨어
app.use(cors()); // CORS 설정 미들웨어
app.use(cors({
origin: process.env.ORIGIN ?? 'https://circles-api.hyunwoo.dev',
credentials: true
})); // CORS 설정 미들웨어
app.use(helmet()); // 보안 미들웨어
app.use(compression()); // 데이터 압축 미들웨어
app.use(PassportJWTAuth.getInitialize()); // Passport 기본 세팅 미들웨어
Expand Down

0 comments on commit db39f0b

Please sign in to comment.