mylomen-server/common/utils/httpHeaderUtil.go

19 lines
356 B
Go
Raw Normal View History

2023-06-04 22:54:54 +08:00
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")
}
2024-09-30 22:49:21 +08:00
func GetPlatform(c *echo.Context) string {
return (*c).Request().Header.Get("platform")
}