mirror of https://github.com/Xhofe/alist
fix(189cloud): link force https (close #821)
parent
a5b757b251
commit
d9652e2a0b
|
@ -10,6 +10,7 @@ import (
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"net/http"
|
"net/http"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Cloud189 struct{}
|
type Cloud189 struct{}
|
||||||
|
@ -198,6 +199,7 @@ func (driver Cloud189) Link(args base.Args, account *model.Account) (*base.Link,
|
||||||
} else {
|
} else {
|
||||||
link.Url = resp.FileDownloadUrl
|
link.Url = resp.FileDownloadUrl
|
||||||
}
|
}
|
||||||
|
link.Url = strings.Replace(link.Url, "http://", "https://", 1)
|
||||||
return &link, nil
|
return &link, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue