Created
July 30, 2012 03:04
-
-
Save diorahman/3203854 to your computer and use it in GitHub Desktop.
Proxy Image
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request') | |
var express = require('express') | |
var server = express.createServer() | |
server.get('/image', function(req, res){ | |
var url = req.query.url ? req.query.url : "" | |
if(url) | |
request(url).pipe(res) | |
else | |
res.send(400) | |
}) | |
server.listen(8000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
e.g.