Skip to content

Commit

Permalink
fix(upload): 修复上传图片到图床时403问题
Browse files Browse the repository at this point in the history
  • Loading branch information
LetTTGACO committed Oct 17, 2022
1 parent fe54248 commit eb1509d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions util/img2cdn.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async function img2Buffer(yuqueImgUrl) {
try {
await superagent
.get(yuqueImgUrl)
.set('User-Agent', 'Mozilla/5.0')
.buffer(true)
.parse(res => {
const buffer = [];
Expand Down

0 comments on commit eb1509d

Please sign in to comment.