*(home): fix golint issues
This commit is contained in:
parent
d7f256ba7f
commit
4e76013334
|
@ -90,7 +90,7 @@ func (a *Auth) loadSessions() {
|
|||
}
|
||||
_ = bkt.ForEach(forEach)
|
||||
if removed != 0 {
|
||||
tx.Commit()
|
||||
_ = tx.Commit()
|
||||
}
|
||||
log.Debug("Auth: loaded %d sessions from DB (removed %d expired)", len(a.sessions), removed)
|
||||
}
|
||||
|
@ -321,6 +321,7 @@ func optionalAuth(handler func(http.ResponseWriter, *http.Request)) func(http.Re
|
|||
if err == nil {
|
||||
r := config.auth.CheckSession(cookie.Value)
|
||||
if r == 0 {
|
||||
|
||||
ok = true
|
||||
} else if r < 0 {
|
||||
log.Debug("Auth: invalid cookie value: %s", cookie)
|
||||
|
|
|
@ -35,7 +35,21 @@ var serviceRulesArray = []svc{
|
|||
{"vk", []string{"||vk.com^"}},
|
||||
{"steam", []string{"||steam.com^"}},
|
||||
{"mail_ru", []string{"||mail.ru^"}},
|
||||
{"tiktok", []string{"||tiktok.com^", "||snssdk.com^", "||amemv.com^", "||toutiao.com^", "||ixigua.com^", "||pstatp.com^", "||ixiguavideo.com^", "||toutiaocloud.com^", "||toutiaocloud.net^", "||bdurl.com^", "||bytecdn.cn^", "||byteimg.com^", "||ixigua.com^"}},
|
||||
{"tiktok", []string{
|
||||
"||tiktok.com^",
|
||||
"||snssdk.com^",
|
||||
"||amemv.com^",
|
||||
"||toutiao.com^",
|
||||
"||ixigua.com^",
|
||||
"||pstatp.com^",
|
||||
"||ixiguavideo.com^",
|
||||
"||toutiaocloud.com^",
|
||||
"||toutiaocloud.net^",
|
||||
"||bdurl.com^",
|
||||
"||bytecdn.cn^",
|
||||
"||byteimg.com^",
|
||||
"||ixigua.com^",
|
||||
}},
|
||||
}
|
||||
|
||||
// convert array to map
|
||||
|
|
|
@ -378,7 +378,7 @@ func (clients *clientsContainer) addFromDHCP() {
|
|||
if len(l.Hostname) == 0 {
|
||||
continue
|
||||
}
|
||||
config.clients.AddHost(l.IP.String(), l.Hostname, ClientSourceDHCP)
|
||||
_, _ = config.clients.AddHost(l.IP.String(), l.Hostname, ClientSourceDHCP)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue