From 730fad999704a8dac65e88a7b647e7e78c9fdf03 Mon Sep 17 00:00:00 2001 From: Marco Date: Tue, 6 Jun 2023 23:56:01 +0200 Subject: [PATCH] Change OriginPattern to correct string. Now web browsers can connect,. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index aca7ffb..97c7608 100644 --- a/main.go +++ b/main.go @@ -66,7 +66,7 @@ func registerForRandomGame(c *gin.Context) { } func registerWebSocketConnection(c *gin.Context) { - webSocketConn, err := websocket.Accept(c.Writer, c.Request, &websocket.AcceptOptions{OriginPatterns: []string{"chess.sw-gross.de:*"}}) + webSocketConn, err := websocket.Accept(c.Writer, c.Request, &websocket.AcceptOptions{OriginPatterns: []string{"chess.sw-gross.de"}}) if err != nil { log.Println(err) return