feat(storage policy): set deny/allow list for file extension and custom regexp (#2695)

This commit is contained in:
Aaron Liu
2025-07-25 11:32:04 +08:00
parent 60bf0e02b3
commit c8c2a60adb
4 changed files with 84 additions and 18 deletions

View File

@@ -41,6 +41,12 @@ type (
Token string `json:"token"`
// 允许的文件扩展名
FileType []string `json:"file_type"`
// IsFileTypeDenyList Whether above list is a deny list.
IsFileTypeDenyList bool `json:"is_file_type_deny_list,omitempty"`
// FileRegexp 文件扩展名正则表达式
NameRegexp string `json:"file_regexp,omitempty"`
// IsNameRegexp Whether above regexp is a deny list.
IsNameRegexpDenyList bool `json:"is_name_regexp_deny_list,omitempty"`
// OauthRedirect Oauth 重定向地址
OauthRedirect string `json:"od_redirect,omitempty"`
// CustomProxy whether to use custom-proxy to get file content