alist/server/common
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
..
auth.go fix: custom token expires in doesn't work 2022-09-27 14:23:56 +08:00
base.go fix: missed assignment [skip ci] 2023-02-22 20:20:28 +08:00
check.go feat: add fine-grained control for link signing (#3924) 2023-03-24 22:44:33 +08:00
check_test.go fix: path `IsApply` check (close #3784) 2023-03-09 21:03:56 +08:00
common.go chore: add id to resp of create storage 2022-11-13 20:17:10 +08:00
hide_privacy_test.go fix: hide access_token in error message of `baidu_netdisk` 2022-09-03 19:48:11 +08:00
proxy.go fix(local): filename with whitespace issue (#3928) 2023-03-23 15:18:37 +08:00
resp.go feat: add alist v3 driver (close #1833 pr #2129) 2022-10-27 10:54:49 +08:00
sign.go feat: optional sign all files 2022-11-30 22:10:07 +08:00