mirror of https://github.com/Xhofe/alist
🚧 change some proxy
parent
731dbf6c3a
commit
fedab86c30
|
@ -124,7 +124,7 @@ func (driver Pan123) GetFiles(parentId string, account *model.Account) ([]Pan123
|
|||
|
||||
func (driver Pan123) Request(url string, method int, headers, query map[string]string, data *base.Json, resp interface{}, proxy bool, account *model.Account) ([]byte, error) {
|
||||
rawUrl := url
|
||||
if account.APIProxyUrl != "" {
|
||||
if account.APIProxyUrl != "" && proxy {
|
||||
url = fmt.Sprintf("%s/%s", account.APIProxyUrl, url)
|
||||
}
|
||||
log.Debugf("request: %s", url)
|
||||
|
|
|
@ -149,7 +149,7 @@ func (driver Pan123) Link(args base.Args, account *model.Account) (*base.Link, e
|
|||
"type": file.Type,
|
||||
}
|
||||
_, err = driver.Request("https://www.123pan.com/api/file/download_info",
|
||||
base.Post, headers, nil, &data, &resp, true, account)
|
||||
base.Post, headers, nil, &data, &resp, false, account)
|
||||
//_, err = pan123Client.R().SetResult(&resp).SetHeader("authorization", "Bearer "+account.AccessToken).
|
||||
// SetBody().Post("https://www.123pan.com/api/file/download_info")
|
||||
if err != nil {
|
||||
|
|
|
@ -79,7 +79,7 @@ func Path(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
// 返回真实的链接,且携带头,只提供给中转程序使用
|
||||
// Link 返回真实的链接,且携带头,只提供给中转程序使用
|
||||
func Link(c *gin.Context) {
|
||||
var req common.PathReq
|
||||
if err := c.ShouldBind(&req); err != nil {
|
||||
|
|
Loading…
Reference in New Issue