|
@@ -23,6 +23,7 @@ var reg_nps = regexp.MustCompile("^/publicapply/nps/.*")
|
|
|
var regWhiteList = regexp.MustCompile("^/publicapply/userbase/whitelist$")
|
|
|
var regEntSearch = regexp.MustCompile("^/publicapply/enterpriseSearch/doQuery") //企业搜索接口
|
|
|
var regOneClick = regexp.MustCompile("^/publicapply/(oneClick|channel)/.*")
|
|
|
+var regOriginalText = regexp.MustCompile("^/publicapply/userbase/getOriginalText$")
|
|
|
|
|
|
func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
|
|
|
session := l.App.SessionManager.Session(req, w)
|
|
@@ -42,6 +43,9 @@ func (l *sessionfilter) Do(w http.ResponseWriter, req *http.Request) bool {
|
|
|
if regWhiteList.MatchString(req.URL.Path) { // 判断用户是不是白名单接口不拦截
|
|
|
return true
|
|
|
}
|
|
|
+ if regOriginalText.MatchString(req.URL.Path) { // 查看原文不拦截 在接口里面判断登录
|
|
|
+ return true
|
|
|
+ }
|
|
|
userId, ok := getSession["userId"].(string)
|
|
|
if !ok || userId == "" {
|
|
|
R.ServeJson(w, req, &Result{Error_code_1004, Error_msg_1004, nil})
|