development -> main #1

Open
Christopher.Hase wants to merge 93 commits from development into main
Showing only changes of commit ce828cd5ef - Show all commits

View file

@ -8,7 +8,8 @@ const port = 8090;
//app.use(cors());
// CORS aktivieren und den Origin explizit setzen
app.use(cors({
origin: 'http://localhost:8080', // Erlaubt Anfragen vom Frontend (localhost:8080)
//origin: 'http://localhost:8080', // Erlaubt Anfragen vom Frontend (localhost:8080)
origin: 'https://192-168-197-2.c-one-infra.de',
methods: ['GET', 'POST', 'OPTIONS'], // Zulässige Methoden
allowedHeaders: ['Content-Type'], // Zulässige Header
credentials: true // Falls du Cookies oder Auth-Daten senden möchtest
@ -20,8 +21,6 @@ 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.post('/api/command', (req, res) => {
executeCommand();
res.status(200).send('Command executed\n');