chore: webdav policy of account

This commit is contained in:
Noah Hsu
2022-06-27 13:58:21 +08:00
parent 2aff218356
commit 087fae1b15
2 changed files with 27 additions and 9 deletions

View File

@ -64,20 +64,27 @@ func getMainItems(config driver.Config) []driver.Item {
}, {
Name: "down_proxy_url",
Type: driver.TypeText,
}, {
Name: "webdav_direct",
Type: driver.TypeBool,
Help: "Transfer the WebDAV of this account through the native without redirect",
}}
if !config.OnlyProxy && !config.OnlyLocal {
items = append(items, []driver.Item{{
Name: "web_proxy",
Type: driver.TypeBool,
}, {
Name: "webdav_proxy",
Type: driver.TypeBool,
Name: "webdav_policy",
Type: driver.TypeSelect,
Values: "302_redirect, use_proxy_url, native_proxy",
Default: "direct",
Required: true,
},
}...)
} else {
items = append(items, driver.Item{
Name: "webdav_policy",
Type: driver.TypeSelect,
Default: "",
Values: "use_proxy_url, native_proxy",
Required: true,
})
}
if config.LocalSort {
items = append(items, []driver.Item{{