alist/internal/model
BaiYi 112363031a
feat: add fine-grained control for link signing (#3924)
* Determine whether the URL requires Sign

* Add File and Mem based KV

NOT TESTED: TokenKV Function

* Change Token KV func to common func.

Add File based KV func

* Remove KV, Remove Token

I found that the original Sign function is enough to complete the link signature, and only need to add simple configuration items to meet the requirements.

* Add IsStorageSigned func to judge if Signing is enabled in the storage settings.

It should be working now.

* Add a SIGN button to the management panel.

* Add enable_sign to the basic storage struct.

Can enable sign for every driver now.

Bug: When sign enabled, in download page, Copy link doesn't contain a sign.

(Not done yet)

* Fix a bug from commit 8f6c25f.

Response of fsread function does not contain sign.

* Optimize code and follow advices.

- Add back public/dist/README.md

- Enable sign when DownProxyUrl is enabled

- Merge needSign() to isEncrypt() in fsread.go

* simplify code

---------

Co-authored-by: Andy Hsu <i@nn.ci>
2023-03-24 22:44:33 +08:00
..
args.go fix(local): incorrect path of thumbnail (for 6453ae0) 2023-01-16 20:02:30 +08:00
meta.go feat: add readme field to list resp 2022-06-30 15:41:58 +08:00
obj.go fix(search): empty parent where update (close #2810) 2023-01-16 17:33:24 +08:00
object.go refactor: obj name mapping and internal path processing (#2733) 2022-12-17 19:49:05 +08:00
req.go feat: multiple search indexes (#2514) 2022-11-28 13:45:25 +08:00
search.go fix: mysql FULLTEXT search (#2840) 2022-12-30 14:20:04 +08:00
setting.go feat: rebuild Single sign-on system (#3649 close #3571) 2023-03-02 17:55:33 +08:00
storage.go feat: add fine-grained control for link signing (#3924) 2023-03-24 22:44:33 +08:00
stream.go refactor: obj name mapping and internal path processing (#2733) 2022-12-17 19:49:05 +08:00
user.go feat: rebuild Single sign-on system (#3649 close #3571) 2023-03-02 17:55:33 +08:00