mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
maintain (logging): improve some log message
This commit is contained in:
parent
e8968d824a
commit
7a76f7dcda
2 changed files with 2 additions and 1 deletions
|
|
@ -110,7 +110,7 @@ func SessionAuthenticate(ctx *App, res http.ResponseWriter, req *http.Request) {
|
|||
c.Secure = true
|
||||
c.SameSite = http.SameSiteNoneMode
|
||||
if f := req.Header.Get("Referer"); f != "" && strings.HasPrefix(f, "https://") == false {
|
||||
Log.Warning("iframe from non secure origin isn't supported '%s'", f)
|
||||
Log.Warning("you are trying to access Filestash from a non secure origin ('%s') and with iframe enabled. Either use SSL or disable iframe from the admin console.", f)
|
||||
}
|
||||
}
|
||||
http.SetCookie(res, c)
|
||||
|
|
|
|||
|
|
@ -287,6 +287,7 @@ func _extractSession(req *http.Request, ctx *App) (map[string]string, error) {
|
|||
str, err = DecryptString(SECRET_KEY_DERIVATE_FOR_USER, str)
|
||||
if err != nil {
|
||||
// This typically happen when changing the secret key
|
||||
Log.Debug("middleware::session decrypt error '%s'", err.Error())
|
||||
return session, nil
|
||||
}
|
||||
if err = json.Unmarshal([]byte(str), &session); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue