codeceptjs / codeceptjs/ui

Missing CORS headers

Aperta
#536 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
84
Fork
30
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I just tried various 1.2.x version and none of them set any CORS headers, so even running on localhost is failing for me due to different ports.

I fixed that locally by editing `node_modules/@codeceptjs/ui/bin/codecept-ui.js` and change

```javascript
const io = require('socket.io')();
```

to

```javascript
const io = require('socket.io')({
cors: {
origin: "http://localhost:3333",
credentials: true,
methods: ["GET", "POST"],
transports: ['websocket', 'polling']
},
allowEIO3: true
});
```

A proper solution would require to make the origin configurable.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.