add http-server part 7.9.12 CORS
All checks were successful
ci / build (push) Successful in 1m15s

This commit is contained in:
Christopher Hase 2025-04-11 14:58:40 +02:00
parent 9c6d71fbc7
commit 0754a99bbb

View file

@ -20,12 +20,12 @@ app.use(cors());
app.options('/api/command', cors()); // für eine bestimmte Route
// Verwende die Middleware, um POST-Body als JSON zu lesen
app.use(express.json());*/
app.use(express.json());
app.use((req, res, next) => {
console.log('CORS headers set');
next();
});
});*/
app.post('/api/command', (req, res) => {
executeCommand();