mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-24 22:34:04 +08:00
fix(123): judge status on get redirect_url (close #4718)
This commit is contained in:
parent
8bdc67ec3d
commit
d17f7f7cad
@ -109,7 +109,7 @@ func (d *Pan123) Link(ctx context.Context, file model.Obj, args model.LinkArgs)
|
||||
log.Debugln("res code: ", res.StatusCode())
|
||||
if res.StatusCode() == 302 {
|
||||
link.URL = res.Header().Get("location")
|
||||
} else if res.StatusCode() == 200 {
|
||||
} else if res.StatusCode() < 300 {
|
||||
link.URL = utils.Json.Get(res.Body(), "data", "redirect_url").ToString()
|
||||
}
|
||||
link.Header = http.Header{
|
||||
|
Loading…
x
Reference in New Issue
Block a user