From 36cdaea2657be4271628a3207e6c13147d28f23b Mon Sep 17 00:00:00 2001 From: Christopher Hase Date: Fri, 11 Apr 2025 12:23:48 +0200 Subject: [PATCH] add http-server part 7.9.3 CORS --- backend/server.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/server.ts b/backend/server.ts index c904015..3d58828 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -6,10 +6,11 @@ const app = express(); const port = 8090; //CORS aktivieren -//app.use(cors()); -app.use(cors({ - origin: 'http://localhost:8090' -})); +app.use(cors()); + +/*app.use(cors({ + origin: 'http://localhost:8080' +}));*/ app.post('/api/command', (req, res) => { executeCommand();