From 17e17cef82900ff210bf06245ffc0481c5b95bd1 Mon Sep 17 00:00:00 2001 From: Taylor Kessler Faulkner Date: Mon, 26 Aug 2024 17:28:05 -0700 Subject: [PATCH] Fix Cors issue by removing get IP address --- feedingwebapp/server.js | 4 +++- feedingwebapp/src/webrtc/webrtc_helpers.js | 6 +++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/feedingwebapp/server.js b/feedingwebapp/server.js index 93ef1ffa..cec47843 100644 --- a/feedingwebapp/server.js +++ b/feedingwebapp/server.js @@ -221,4 +221,6 @@ function handleTrackEvent(e, topic) { senderStream[topic] = e.streams[0] } -app.listen(process.env.REACT_APP_SIGNALLING_SERVER_PORT, () => console.log(Date(Date.now()).toString(), 'Server started')) +app.listen(process.env.REACT_APP_SIGNALLING_SERVER_PORT, () => + console.log(Date(Date.now()).toString(), 'Server started on port', process.env.REACT_APP_SIGNALLING_SERVER_PORT) +) diff --git a/feedingwebapp/src/webrtc/webrtc_helpers.js b/feedingwebapp/src/webrtc/webrtc_helpers.js index e866253f..121da6df 100644 --- a/feedingwebapp/src/webrtc/webrtc_helpers.js +++ b/feedingwebapp/src/webrtc/webrtc_helpers.js @@ -46,11 +46,11 @@ export class WebRTCConnection { console.log('onnegotiationneeded') const offer = await this.peerConnection.createOffer() await this.peerConnection.setLocalDescription(offer) - const ip = await this.getIPAddress() + // const ip = await this.getIPAddress() const payload = { sdp: this.peerConnection.localDescription, - topic: this.topic, - ip: ip + topic: this.topic + // ip: ip } console.log('sending payload', payload) const { data } = await axios.post(this.url, payload)