Skip to content

Commit

Permalink
Fix Cors issue by removing get IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
Taylor Kessler Faulkner committed Aug 27, 2024
1 parent a15547c commit 17e17ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion feedingwebapp/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
6 changes: 3 additions & 3 deletions feedingwebapp/src/webrtc/webrtc_helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 17e17ce

Please sign in to comment.