Skip to content

Commit

Permalink
fix: add cors whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
2paperstar committed Jun 5, 2024
1 parent c0d2e18 commit 809ef87
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ async function bootstrap() {
.addBearerAuth()
.build();

const whitelist = [/https:\/\/.*check-out.paperst.ar/];
const whitelist = [
/https:\/\/check-out.paperst.ar/,
/https:\/\/.*check-out.paperst.ar/,
];
app.enableCors({
origin: function (origin, callback) {
if (!origin || whitelist.some((regex) => regex.test(origin))) {
Expand Down

0 comments on commit 809ef87

Please sign in to comment.