blob: 068ef9fb76efb5c12a7f9a7759680ac4d68081fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
package ws
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/websocket/v2"
)
func wsMiddleware(c *fiber.Ctx) error {
if websocket.IsWebSocketUpgrade(c) {
return c.Next()
}
return fiber.ErrUpgradeRequired
}
|