广告涉及的mq都放这里
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mw_checker.go 391 B

2 달 전
12345678910111213141516171819202122
  1. package mw
  2. import (
  3. "strings"
  4. "github.com/gin-gonic/gin"
  5. "applet/app/e"
  6. "applet/app/md"
  7. )
  8. // 检查设备等, 把头部信息下放到hdl可以获取
  9. func Checker(c *gin.Context) {
  10. // 校验平台支持
  11. platform := strings.ToLower(c.GetHeader("Platform"))
  12. //fmt.Println(platform)
  13. if _, ok := md.PlatformList[platform]; !ok {
  14. e.OutErr(c, e.ERR_PLATFORM)
  15. return
  16. }
  17. c.Next()
  18. }