feat: include credentials if needed

This commit is contained in:
amhsirak
2024-12-03 21:25:25 +05:30
parent ed7690cb29
commit c606121249

View File

@@ -102,6 +102,7 @@ app.use((req, res, next) => {
res.header('Access-Control-Allow-Origin', allowedOrigin);
res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization');
res.header('Access-Control-Allow-Credentials', 'true');
if (req.method === 'OPTIONS') {
return res.sendStatus(200);
}