add http-server part 7.9.3 CORS
This commit is contained in:
parent
61dec47fcb
commit
36cdaea265
1 changed files with 5 additions and 4 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue