package filter

import (
	"regexp"

	"github.com/donnie4w/go-logger/logger"
	"github.com/go-xweb/xweb"
)

func init() {
	logger.Debug("过滤器")
	matchUrl := make([]*regexp.Regexp, 0)
	filter, _ := regexp.Compile("/front")
	matchUrl = append(matchUrl, filter)
	xweb.AddFilter(&sessfilter{App: xweb.RootApp(), SessionName: "loginuser",
		MatchUrl: matchUrl})
}
