소스 검색

feat:三级页seo

wangchuanjin 2 년 전
부모
커밋
229d6a24ac
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/jfw/front/shorturl.go

+ 1 - 0
src/jfw/front/shorturl.go

@@ -59,6 +59,7 @@ var seoAgentReg = regexp.MustCompile("Baiduspider|360Spider|bingbot|Googlebot")
 
 func (s *Short) Article(stype, id string) error {
 	userId, _ := s.GetSession("userId").(string)
+	log.Println("======", stype, userId, seoAgentReg.MatchString(s.UserAgent()))
 	if stype == "content" && userId == "" && seoAgentReg.MatchString(s.UserAgent()) {
 		sids := encrypt.CommonDecodeArticle(stype, id)
 		return s.NologinCommon("", stype, id, sids[0])