Skip to content

Commit

Permalink
change sence
Browse files Browse the repository at this point in the history
  • Loading branch information
dotos committed Jan 6, 2018
1 parent b7f868f commit a2c8489
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions routes/photo.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,15 @@ router.get('/:photo', function(req, res, next) {
'Content-Disposition': 'attachment; filename=' + encodeURI(`${photo}_1920x1080.jpg`)
});
try {
res.redirect(`${CDN}bing/${photo}_1920x1080.jpg`)
request.get(`${CDN}bing/${photo}_1920x1080.jpg`)
.set({
'User-Agent': ua,
referer: 'https://bing.ioliu.cn'
}).end()
.pipe(res);
} catch (error) {
console.log(error)
consle.log(error)
}
// request.get(`${CDN}bing/${photo}_1920x1080.jpg`)
// // .set({
// // 'User-Agent': ua,
// // referer: 'https://bing.ioliu.cn'
// // })
// .pipe(res);
//console.log(`${CDN}bing/${photo}_1920x1080.jpg`)
} else {
res.json({
Expand Down

0 comments on commit a2c8489

Please sign in to comment.