Update index.js
Browse files
index.js
CHANGED
@@ -76,13 +76,7 @@ const allowedOrigins = [
|
|
76 |
];
|
77 |
|
78 |
app.use(cors({
|
79 |
-
origin:
|
80 |
-
if (allowedOrigins.includes(origin)) {
|
81 |
-
callback(null, true);
|
82 |
-
} else {
|
83 |
-
callback(new Error('Not allowed by CORS'));
|
84 |
-
}
|
85 |
-
},
|
86 |
methods: ['GET', 'POST'],
|
87 |
allowedHeaders: ['Content-Type', 'Authorization', 'x-api-key'],
|
88 |
credentials: true,
|
|
|
76 |
];
|
77 |
|
78 |
app.use(cors({
|
79 |
+
origin: "*",
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
methods: ['GET', 'POST'],
|
81 |
allowedHeaders: ['Content-Type', 'Authorization', 'x-api-key'],
|
82 |
credentials: true,
|