perf(websocket): added in base url to help with ssl stuff and iis
This commit is contained in:
@@ -11,7 +11,7 @@ var (
|
||||
broadcaster = make(chan logging.Message)
|
||||
)
|
||||
|
||||
func RegisterSocketRoutes(r *gin.Engine) {
|
||||
func RegisterSocketRoutes(r *gin.Engine, base_url string) {
|
||||
// Initialize all channels
|
||||
InitializeChannels()
|
||||
|
||||
@@ -23,11 +23,11 @@ func RegisterSocketRoutes(r *gin.Engine) {
|
||||
go StartBroadcasting(broadcaster, channels)
|
||||
|
||||
// WebSocket route
|
||||
r.GET("/ws", func(c *gin.Context) {
|
||||
r.GET(base_url+"/ws", func(c *gin.Context) {
|
||||
SocketHandler(c, channels)
|
||||
})
|
||||
|
||||
r.GET("/ws/clients", AdminAuthMiddleware(), handleGetClients)
|
||||
r.GET(base_url+"/ws/clients", AdminAuthMiddleware(), handleGetClients)
|
||||
}
|
||||
|
||||
func handleGetClients(c *gin.Context) {
|
||||
|
||||
@@ -114,7 +114,7 @@ func main() {
|
||||
})
|
||||
|
||||
//logging.RegisterLoggerRoutes(r, basePath)
|
||||
websocket.RegisterSocketRoutes(r)
|
||||
websocket.RegisterSocketRoutes(r, basePath)
|
||||
config.RegisterConfigRoutes(r, basePath)
|
||||
|
||||
r.Any(basePath+"/api", errorApiLoc)
|
||||
|
||||
Reference in New Issue
Block a user