fix: DProxyTypes judge
This commit is contained in:
@ -7,7 +7,6 @@ import (
|
||||
"github.com/Xhofe/alist/utils"
|
||||
"github.com/gin-gonic/gin"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"path"
|
||||
)
|
||||
|
||||
func Down(c *gin.Context) {
|
||||
@ -19,7 +18,7 @@ func Down(c *gin.Context) {
|
||||
common.ErrorResp(c, err, 500)
|
||||
return
|
||||
}
|
||||
if driver.Config().OnlyProxy || account.Proxy || utils.IsContain(conf.DProxyTypes, path.Ext(rawPath)) {
|
||||
if driver.Config().OnlyProxy || account.Proxy || utils.IsContain(conf.DProxyTypes, utils.Ext(rawPath)) {
|
||||
Proxy(c)
|
||||
return
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ func Proxy(c *gin.Context) {
|
||||
// 4. 开启webdav中转(需要验证sign)
|
||||
if !account.Proxy && !driver.Config().OnlyProxy &&
|
||||
utils.GetFileType(filepath.Ext(rawPath)) != conf.TEXT &&
|
||||
!utils.IsContain(conf.DProxyTypes, filepath.Ext(rawPath)) {
|
||||
!utils.IsContain(conf.DProxyTypes, utils.Ext(rawPath)) {
|
||||
// 只开启了webdav中转,验证sign
|
||||
ok := false
|
||||
if account.WebdavProxy {
|
||||
|
Reference in New Issue
Block a user