users service: add sessions (#17744)
* users: add cache to service * reflect review comments
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
0ae307808a
Коммит
24fb0033f4
@@ -206,7 +206,7 @@ func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
if token != "" && tokenLocation != app.TokenLocationCloudHeader && tokenLocation != app.TokenLocationRemoteClusterHeader {
|
||||
session, err := c.App.GetSession(token)
|
||||
defer app.ReturnSessionToPool(session)
|
||||
defer c.App.ReturnSessionToPool(session)
|
||||
|
||||
if err != nil {
|
||||
c.Logger.Info("Invalid session", mlog.Err(err))
|
||||
|
||||
Ссылка в новой задаче
Block a user