cors updated

This commit is contained in:
Roozbeh Karimi 2025-10-02 11:46:07 -04:00
parent 15dcfae51c
commit d179e93781

View File

@ -28,11 +28,11 @@ function logRequests(req, res, next) {
}
app.use(logRequests);
const allowedOrigins = ["http://localhost:3000"];
const allowedOrigins = ["https://aeroecho.onrender.com"];
// if (NODE_ENV === "development" || NODE_ENV === "staging") {
// allowedOrigins.push("http://localhost:3000");
// }
if (NODE_ENV === "development" || NODE_ENV === "staging") {
allowedOrigins.push("http://localhost:3000");
}
const corsOptions = {
origin: function (origin, callback) {