mirror of
https://github.com/datarhei/core.git
synced 2025-10-06 16:37:04 +08:00
Give reason why session validation failed
This commit is contained in:
@@ -92,7 +92,7 @@ func NewWithConfig(config Config) echo.MiddlewareFunc {
|
||||
|
||||
data, err := verifySession(util.DefaultContext[interface{}](c, "session", nil), path, referrer)
|
||||
if err != nil {
|
||||
return api.Err(http.StatusForbidden, "", "invalid session data")
|
||||
return api.Err(http.StatusForbidden, "", "verifying session failed: %s", err.Error())
|
||||
}
|
||||
|
||||
data["name"] = ctxuser
|
||||
|
Reference in New Issue
Block a user