diff --git a/src/config/cors.ts b/src/config/cors.ts index 6d6e138c..9a89066f 100644 --- a/src/config/cors.ts +++ b/src/config/cors.ts @@ -5,13 +5,13 @@ config(); const allowedOrigins = process.env.ANIWATCH_API_CORS_ALLOWED_ORIGINS ? process.env.ANIWATCH_API_CORS_ALLOWED_ORIGINS.split(",") - : ["http://localhost:4000", "*"]; + : ["http://localhost:4000", "http://localhost:8081", "http://localhost:19006", "*"]; const corsConfig = cors({ - allowMethods: ["GET"], + allowMethods: ["GET", "OPTIONS"], maxAge: 600, - credentials: true, - origin: allowedOrigins, + credentials: false, // Set to false to allow * origin + origin: "*", // Allow all origins for local development }); export default corsConfig;