add http-server part 7.9.3 CORS

This commit is contained in:
Christopher Hase 2025-04-11 12:23:48 +02:00
parent 61dec47fcb
commit 36cdaea265

View file

@ -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();