Skip to content

Commit

Permalink
update: cors
Browse files Browse the repository at this point in the history
  • Loading branch information
siwonpada committed May 15, 2024
1 parent 029f10b commit d80c1fe
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ async function bootstrap() {
// Cookie 설정
app.use(cookieParser());
// CORS 설정
const whitelist = [
/https:\/\/.*idp.gistory.me/,
/http:\/\/localhost:3000\/*/,
];
const whitelist = [/https:\/\/.*idp.gistory.me/, /http:\/\/localhost:3000/];
app.enableCors({
origin: function (origin, callback) {
if (!origin || whitelist.some((regex) => regex.test(origin))) {
Expand Down

0 comments on commit d80c1fe

Please sign in to comment.