added definitions

alpha
alex 2023-02-04 00:55:26 +01:00
parent c261d427ae
commit cb52feebfa
2 changed files with 7 additions and 1 deletions

View File

@ -8,6 +8,7 @@ import (
"clickandjoin.app/websocketserver/modules/rabbitmq"
"clickandjoin.app/websocketserver/modules/scylladb"
"clickandjoin.app/websocketserver/modules/structs"
"clickandjoin.app/websocketserver/modules/utils"
"clickandjoin.app/websocketserver/socketserver"
"github.com/gofiber/fiber/v2"
@ -43,7 +44,7 @@ func main() {
wsSession := c.Query("auth")
// no auth query available
if len(wsSession) == 0 {
if len(wsSession) != utils.LenWebSocketSession {
return c.SendStatus(fiber.StatusUnauthorized)
}

View File

@ -0,0 +1,5 @@
package utils
const (
LenWebSocketSession = 36
)