aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main.go')
-rw-r--r--main.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.go b/main.go
index f7ad319..947fad0 100644
--- a/main.go
+++ b/main.go
@@ -86,6 +86,7 @@ var (
upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
+ CheckOrigin: checkOrigin,
}
peerConnectionConfig = webrtc.Configuration{}
@@ -189,6 +190,10 @@ func handleWebsocketMessage(pc *webrtc.PeerConnection, ws *websocket.Conn, messa
return nil
}
+func checkOrigin(r *http.Request) bool {
+ return true;
+}
+
func serveWs(w http.ResponseWriter, r *http.Request) {
ws, err := upgrader.Upgrade(w, r, nil)
if err != nil {