Skip to content

Commit 17e17ce

Browse files
author
Taylor Kessler Faulkner
committed
Fix Cors issue by removing get IP address
1 parent a15547c commit 17e17ce

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

feedingwebapp/server.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,4 +221,6 @@ function handleTrackEvent(e, topic) {
221221
senderStream[topic] = e.streams[0]
222222
}
223223

224-
app.listen(process.env.REACT_APP_SIGNALLING_SERVER_PORT, () => console.log(Date(Date.now()).toString(), 'Server started'))
224+
app.listen(process.env.REACT_APP_SIGNALLING_SERVER_PORT, () =>
225+
console.log(Date(Date.now()).toString(), 'Server started on port', process.env.REACT_APP_SIGNALLING_SERVER_PORT)
226+
)

feedingwebapp/src/webrtc/webrtc_helpers.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ export class WebRTCConnection {
4646
console.log('onnegotiationneeded')
4747
const offer = await this.peerConnection.createOffer()
4848
await this.peerConnection.setLocalDescription(offer)
49-
const ip = await this.getIPAddress()
49+
// const ip = await this.getIPAddress()
5050
const payload = {
5151
sdp: this.peerConnection.localDescription,
52-
topic: this.topic,
53-
ip: ip
52+
topic: this.topic
53+
// ip: ip
5454
}
5555
console.log('sending payload', payload)
5656
const { data } = await axios.post(this.url, payload)

0 commit comments

Comments
 (0)