Change OriginPattern to correct string. Now web browsers can connect,.

This commit is contained in:
Marco 2023-06-06 23:56:01 +02:00
parent 9f4cab679c
commit 730fad9997

View File

@ -66,7 +66,7 @@ func registerForRandomGame(c *gin.Context) {
} }
func registerWebSocketConnection(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 { if err != nil {
log.Println(err) log.Println(err)
return return