mylomen-server/common/utils/httpHeaderUtil.go
shaoyongjun adfc73df29 to:sync
2024-09-30 22:49:21 +08:00

19 lines
356 B
Go

package utils
import (
"github.com/labstack/echo/v4"
)
func GetAccessToken(c *echo.Context) string {
accessToken := (*c).Request().Header.Get(echo.HeaderAuthorization)
if accessToken != "" {
return accessToken
}
return (*c).Request().Header.Get("udt")
}
func GetPlatform(c *echo.Context) string {
return (*c).Request().Header.Get("platform")
}