From d6b618988d2801d9922737e83ebd1f3ee418e608 Mon Sep 17 00:00:00 2001 From: MickaelK Date: Thu, 5 Dec 2024 23:28:48 +1100 Subject: [PATCH] fix (caching): cache invalidation issue until this, if a user tries to connect to the same backend with a different path, the frontend would flicker as we'd get things from the wrong cache key --- server/ctrl/session.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ctrl/session.go b/server/ctrl/session.go index 2f4ae02f..21468258 100644 --- a/server/ctrl/session.go +++ b/server/ctrl/session.go @@ -43,7 +43,7 @@ func SessionGet(ctx *App, res http.ResponseWriter, req *http.Request) { } r.IsAuth = true r.Home = NewString(home) - r.Backend = GenerateID(ctx.Session) + r.Backend = Hash(GenerateID(ctx.Session)+ctx.Session["path"], 20) if ctx.Share.Id == "" && Config.Get("features.protection.enable_chromecast").Bool() { r.Authorization = ctx.Authorization }