From 8c1502008fcc8f02bcca7ed4d7a3398cfa0813b7 Mon Sep 17 00:00:00 2001 From: Rami Berman Date: Thu, 6 Jan 2022 17:10:20 +0200 Subject: [PATCH] fix /ws auth --- agent/pkg/api/socket_routes.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/pkg/api/socket_routes.go b/agent/pkg/api/socket_routes.go index 41a1064e6..fa0257799 100644 --- a/agent/pkg/api/socket_routes.go +++ b/agent/pkg/api/socket_routes.go @@ -46,9 +46,9 @@ func init() { } func WebSocketRoutes(app *gin.Engine, eventHandlers EventHandlers, startTime int64) { - app.GET("/ws", func(c *gin.Context) { + app.GET("/ws", middlewares.RequiresAuth(), func(c *gin.Context) { websocketHandler(c.Writer, c.Request, eventHandlers, false, startTime) - }, middlewares.RequiresAuth()) + }) app.GET("/wsTapper", func(c *gin.Context) { // TODO: add m2m authentication to this route websocketHandler(c.Writer, c.Request, eventHandlers, true, startTime)