mirror of
https://github.com/labstack/echo.git
synced 2025-07-05 00:58:47 +02:00
@ -22,11 +22,11 @@ const (
|
||||
func BasicAuth(fn BasicValidateFunc) echo.HandlerFunc {
|
||||
return func(c echo.Context) error {
|
||||
// Skip WebSocket
|
||||
if (c.Request().Header().Get(echo.Upgrade)) == echo.WebSocket {
|
||||
if (c.Request().Header.Get(echo.Upgrade)) == echo.WebSocket {
|
||||
return nil
|
||||
}
|
||||
|
||||
auth := c.Request().Header().Get(echo.Authorization)
|
||||
auth := c.Request().Header.Get(echo.Authorization)
|
||||
l := len(Basic)
|
||||
|
||||
if len(auth) > l+1 && auth[:l] == Basic {
|
||||
|
Reference in New Issue
Block a user