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

This commit is contained in:
Christopher Hase 2025-04-11 13:23:35 +02:00
parent edf15bbf47
commit 33d4fd94f2

View file

@ -9,7 +9,8 @@ const port = 8090;
app.use(cors());
// Füge dies hinzu, um die OPTIONS-Anfragen korrekt zu behandeln
app.options('*', cors());
//app.options('*', 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());