mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-06-16 05:55:33 +00:00
update 401
This commit is contained in:
parent
93262dc549
commit
c649b67c20
@ -90,7 +90,10 @@ func InitV2Router() http.Handler {
|
|||||||
},
|
},
|
||||||
TokenLookupFuncs: []echo_middleware.ValuesExtractor{
|
TokenLookupFuncs: []echo_middleware.ValuesExtractor{
|
||||||
func(c echo.Context) ([]string, error) {
|
func(c echo.Context) ([]string, error) {
|
||||||
return []string{c.Request().Header.Get(echo.HeaderAuthorization)}, nil
|
if len(c.Request().Header.Get(echo.HeaderAuthorization)) > 0 {
|
||||||
|
return []string{c.Request().Header.Get(echo.HeaderAuthorization)}, nil
|
||||||
|
}
|
||||||
|
return []string{c.QueryParam("token")}, nil
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}))
|
}))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user