Change OriginPattern to correct string. Now web browsers can connect,.
This commit is contained in:
parent
9f4cab679c
commit
730fad9997
2
main.go
2
main.go
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user