From 11ebb139af7fb07da81660b55f7aadda911749a9 Mon Sep 17 00:00:00 2001 From: efe-osa Date: Wed, 11 Jun 2025 06:13:52 +0200 Subject: [PATCH] fix: update cors --- server/src/index.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/server/src/index.ts b/server/src/index.ts index e8059a4..98fd588 100644 --- a/server/src/index.ts +++ b/server/src/index.ts @@ -15,13 +15,7 @@ const port = config.PORT; // Middleware app.use(helmet()); -app.use(cors( - { - origin: ['http://localhost:3000', 'http://localhost:3001', "https://sql-assistant-server.up.railway.app"], - methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'], - allowedHeaders: ['Content-Type', 'Authorization'] - } -)); +app.use(cors()); app.use(compression()); app.use(express.json()); app.use(rateLimit({