From 86beadc0ed902e89027ecb47d9fbd80d791ba426 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Sun, 26 Mar 2023 16:19:01 +0800 Subject: [PATCH] fix: missed sign with enable `sign_all` (close #3957) --- server/handles/fsread.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/handles/fsread.go b/server/handles/fsread.go index 11cfbca03f5..aab856e2200 100644 --- a/server/handles/fsread.go +++ b/server/handles/fsread.go @@ -6,10 +6,12 @@ import ( "strings" "time" + "github.com/alist-org/alist/v3/internal/conf" "github.com/alist-org/alist/v3/internal/errs" "github.com/alist-org/alist/v3/internal/fs" "github.com/alist-org/alist/v3/internal/model" "github.com/alist-org/alist/v3/internal/op" + "github.com/alist-org/alist/v3/internal/setting" "github.com/alist-org/alist/v3/internal/sign" "github.com/alist-org/alist/v3/pkg/utils" "github.com/alist-org/alist/v3/server/common" @@ -264,7 +266,7 @@ func FsGet(c *gin.Context) { } if storage.Config().MustProxy() || storage.GetStorage().WebProxy { query := "" - if isEncrypt(meta, reqPath) { + if isEncrypt(meta, reqPath) || setting.GetBool(conf.SignAll) { query = "?sign=" + sign.Sign(reqPath) } if storage.GetStorage().DownProxyUrl != "" {