Skip to content

Commit

Permalink
refactor/ referer를 origin으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
dev2820 committed Aug 27, 2023
1 parent ffde6b0 commit f4edcc3
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 @@ -47,7 +47,7 @@ app.use(
'http://localhost:3000/',
];

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

0 comments on commit f4edcc3

Please sign in to comment.