parent
b98e77e641
commit
27fe2cb30e
2 changed files with 3 additions and 18 deletions
@ -1,17 +0,0 @@ |
||||
const express = require('express') |
||||
const request = require('request'); |
||||
const app = express() |
||||
const port = 3000 |
||||
|
||||
app.listen(port, () => console.log(`Ushio-proxy listening at http://localhost:${port}`)) |
||||
app.use(express.static(__dirname + '/public')); |
||||
|
||||
app.get('/get/', (req, res) => { |
||||
|
||||
if(req.query.hasOwnProperty('url')){ |
||||
let web = request(new Buffer(req.query.url, 'base64').toString(), req.headers); |
||||
req.pipe(web); |
||||
web.pipe(res); |
||||
} |
||||
|
||||
}) |
Loading…
Reference in new issue