CuAnnan
CuAnnan
Response headers to wss://localhost/peerjs?key=peerjs&id=ZNfSEBbys&token=5h161q1gq5m ```HTTP/1.1 200 OK X-Powered-By: Express Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept Content-Type: application/json; charset=utf-8 Content-Length: 140 ETag: W/"8c-OP0zOSq0rX5Ungn973BP6obbpvw" Date: Sat, 06 Mar 2021 00:50:44 GMT...
Request headers ``` GET /peerjs?key=peerjs&id=ZNfSEBbys&token=5h161q1gq5m HTTP/1.1 Host: localhost User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0 Accept: */* Accept-Language: en-GB,en;q=0.5 Accept-Encoding: gzip, deflate, br Sec-WebSocket-Version: 13 Origin: https://localhost...
``` (function($) { $(function() { console.log("Onload event fired"); const peer = new Peer( 'ZNfSEBbys', { host:'localhost', port:443, debug: 3, secure:true } ); peer.on('open', function (id) { console.log("Peer connection up and...
Console output ```Firefox can't establish a connection to the server at wss://localhost/peerjs?key=peerjs&id=ZNfSEBbys&token=apiwlvwmkle. socket.ts:41:23 PeerJS: Socket closed. close { target: WebSocket, isTrusted: true, wasClean: false, code: 1006, reason: "", srcElement: WebSocket,...
https://localhost/peerjs responds with ```{"name":"PeerJS Server","description":"A server side element to broker connections between PeerJS clients.","website":"https://peerjs.com/"}```
https://localhost/peerjs/id responds with a 404
I've tried giving it the path /peerjs in both front and back end, but it results in identical behaviour.
``` NotFoundError: Not Found at projectPath\app.js:84:8 at Layer.handle [as handle_request] (projectPath\node_modules\express\lib\router\layer.js:95:5) at trim_prefix (projectPath\node_modules\express\lib\router\index.js:317:13) at projectPath\node_modules\express\lib\router\index.js:284:7 at Function.process_params (projectPath\node_modules\express\lib\router\index.js:335:12) at next (projectPath\node_modules\express\lib\router\index.js:275:10) at projectPath\node_modules\express\lib\application.js:233:9 at projectPath\node_modules\peer\node_modules\express\lib\router\index.js:635:15 at next (projectPath\node_modules\peer\node_modules\express\lib\router\index.js:260:14) at...
Which makes it look like router is taking over and not respecting app.use('/peerjs', peer); I've tried moving it up and down, but to no avail.
With the code as it is, if I try to set the path in the front end to /peerjs, before I get to the current error, wss://localhost/peerjs/peerjs?key=peerjs&id=ZNfSEBbys&token=d9krdtoczq8 returns a 404...