added definitions
parent
c261d427ae
commit
cb52feebfa
3
main.go
3
main.go
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
package utils
|
||||
|
||||
const (
|
||||
LenWebSocketSession = 36
|
||||
)
|
Loading…
Reference in New Issue