Skip to content

Commit

Permalink
🐛 close #379 fix google drive can't get text file
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Jan 17, 2022
1 parent cfb51e9 commit 96a2379
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion server/controllers/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 96a2379

Please sign in to comment.