🚧 change some proxy

pull/548/head
微凉 2021-12-19 20:55:29 +08:00
parent 731dbf6c3a
commit fedab86c30
3 changed files with 3 additions and 3 deletions

View File

@ -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)

View File

@ -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 {

View File

@ -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 {