Skip to content

Commit

Permalink
refactor/ 아몰랑
Browse files Browse the repository at this point in the history
  • Loading branch information
dev2820 committed Aug 27, 2023
1 parent 670a93e commit 50c0a2b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ app.use(
'http://localhost:3000/',
];

const domain = ctx.request.header.referer?.slice(0, -1);
const domain = ctx.request.header.origin && ctx.request.header.referer;
if (!domain || !allowedOrigins.includes(domain)) {
return ctx.throw(403, `${domain} is not a valid origin`);
}
Expand Down

0 comments on commit 50c0a2b

Please sign in to comment.