浏览代码

feat:seo1

wangchuanjin 2 年之前
父节点
当前提交
f9c3af2a00
共有 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, s.UserAgent())
 	if (stype == "content" || stype == "indexcontent") && userId == "" && seoAgentReg.MatchString(s.UserAgent()) {
 		sids := encrypt.CommonDecodeArticle(stype, id)
 		return s.NologinCommon("", stype, id, sids[0])