mirror of
https://github.com/AlistGo/alist.git
synced 2025-04-23 13:54:04 +08:00
🐛 close #379 fix google drive can't get text file
This commit is contained in:
parent
cfb51e9f80
commit
96a237902b
@ -146,7 +146,13 @@ func init() {
|
||||
}
|
||||
|
||||
func Text(c *gin.Context, link *base.Link) {
|
||||
res, err := client.R().Get(link.Url)
|
||||
req := client.R()
|
||||
if link.Headers != nil {
|
||||
for _, header := range link.Headers {
|
||||
req.SetHeader(header.Name, header.Value)
|
||||
}
|
||||
}
|
||||
res, err := req.Get(link.Url)
|
||||
if err != nil {
|
||||
common.ErrorResp(c, err, 500)
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user