Scheduling Node
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
package routers
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
"oc-scheduler/controllers"
|
||||
|
||||
beego "github.com/beego/beego/v2/server/web"
|
||||
@@ -46,4 +47,8 @@ func init() {
|
||||
)
|
||||
|
||||
beego.AddNamespace(ns)
|
||||
|
||||
// WebSocket route registered outside the Beego pipeline to avoid the
|
||||
// spurious WriteHeader that prevents the 101 Switching Protocols upgrade.
|
||||
beego.Handler("/oc/:id/check", http.HandlerFunc(controllers.CheckStreamHandler))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user