added WebSocket origin check

This commit is contained in:
iesrbt 2023-02-17 10:18:14 +01:00 committed by GitHub
parent c6b17b0ee6
commit 30767b10c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
app.go
View File

@ -50,6 +50,9 @@ func init() {
var upgrader = websocket.Upgrader{
ReadBufferSize: 1024,
WriteBufferSize: 1024,
CheckOrigin: func(r *http.Request) bool {
return true
},
}
func main() {