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

18 lines
338 B

  1. package mw
  2. import (
  3. "github.com/gin-gonic/gin"
  4. )
  5. // 修改传过来的头部字段
  6. func ChangeHeader(c *gin.Context) {
  7. appvserison := c.GetHeader("AppVersionName")
  8. if appvserison == "" {
  9. appvserison = c.GetHeader("app_version_name")
  10. }
  11. if appvserison != "" {
  12. c.Request.Header.Add("app_version_name", appvserison)
  13. }
  14. c.Next()
  15. }