Skip to content

Commit 61eaca2

Browse files
committed
modify allowed origins config
1 parent fbe6d98 commit 61eaca2

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const app = express();
2020
// 1) Enable CORS for your domains
2121
app.use(
2222
cors({
23-
origin: config.ALLOWED_ORIGINS.split(","), // e.g. 'https://club.example.com'
23+
origin: config.ALLOWED_ORIGINS || "*", // e.g. 'https://club.example.com'
2424
methods: ["GET", "POST", "PATCH", "DELETE", "OPTIONS"],
2525
credentials: true,
2626
}),

src/config/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ export default {
44
DIRECT_URL: process.env.DIRECT_URL!,
55
SUPABASE_URL: process.env.SUPABASE_URL!,
66
SUPABASE_SERVICE_ROLE_KEY: process.env.SUPABASE_SERVICE_ROLE_KEY!,
7-
ALLOWED_ORIGINS: process.env.ALLOWED_ORIGINS || "*",
7+
ALLOWED_ORIGINS: process.env.ALLOWED_ORIGINS,
88
};

0 commit comments

Comments
 (0)