feat: adding apiKey for authentication

This commit is contained in:
2025-11-21 16:24:33 +07:00
parent 49a30d3b44
commit 4fc0c438c8
7 changed files with 147 additions and 19 deletions

View File

@@ -17,6 +17,7 @@ func main() {
s, err := server.NewSafeWebsocketServerBuilder().
BaseHost("localhost").
BasePort(8080).
ApiKey("").
HandleFuncWebsocket("/ws/test/", "data_1", func(c chan []byte) {
ticker := time.NewTicker(10 * time.Millisecond)
for range ticker.C {