mirror of https://github.com/Xhofe/alist
fix: clear cookie for 189 cloud login
parent
2dbedc245c
commit
b21801d505
|
@ -17,6 +17,7 @@ import (
|
||||||
"io"
|
"io"
|
||||||
"math"
|
"math"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"net/http/cookiejar"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -105,6 +106,9 @@ func (driver Cloud189) Login(account *model.Account) error {
|
||||||
client.SetRetryCount(3)
|
client.SetRetryCount(3)
|
||||||
client.SetHeader("Referer", "https://cloud.189.cn/")
|
client.SetHeader("Referer", "https://cloud.189.cn/")
|
||||||
}
|
}
|
||||||
|
// clear cookie
|
||||||
|
jar, _ := cookiejar.New(nil)
|
||||||
|
client.SetCookieJar(jar)
|
||||||
url := "https://cloud.189.cn/api/portal/loginUrl.action?redirectURL=https%3A%2F%2Fcloud.189.cn%2Fmain.action"
|
url := "https://cloud.189.cn/api/portal/loginUrl.action?redirectURL=https%3A%2F%2Fcloud.189.cn%2Fmain.action"
|
||||||
b := ""
|
b := ""
|
||||||
lt := ""
|
lt := ""
|
||||||
|
|
Loading…
Reference in New Issue