Skip to content

Commit eb1509d

Browse files
committed
fix(upload): 修复上传图片到图床时403问题
1 parent fe54248 commit eb1509d

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

util/img2cdn.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ async function img2Buffer(yuqueImgUrl) {
2222
try {
2323
await superagent
2424
.get(yuqueImgUrl)
25+
.set('User-Agent', 'Mozilla/5.0')
2526
.buffer(true)
2627
.parse(res => {
2728
const buffer = [];

0 commit comments

Comments
 (0)