mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
websocket in api scope.
This commit is contained in:
parent
6d59b3feff
commit
57ed35552f
@ -43,7 +43,7 @@ func New(WebSocketManager types.WebSocketManager, ApiManager types.ApiManager, c
|
|||||||
|
|
||||||
router.Route("/api", ApiManager.Route)
|
router.Route("/api", ApiManager.Route)
|
||||||
|
|
||||||
router.Get("/ws", func(w http.ResponseWriter, r *http.Request) {
|
router.Get("/api/ws", func(w http.ResponseWriter, r *http.Request) {
|
||||||
//nolint
|
//nolint
|
||||||
WebSocketManager.Upgrade(w, r, func(r *http.Request) bool {
|
WebSocketManager.Upgrade(w, r, func(r *http.Request) bool {
|
||||||
return conf.AllowOrigin(r.Header.Get("Origin"))
|
return conf.AllowOrigin(r.Header.Get("Origin"))
|
||||||
|
Loading…
Reference in New Issue
Block a user