Skip to content

Instantly share code, notes, and snippets.

View vvolodin's full-sized avatar

Volodymyr Volodin vvolodin

View GitHub Profile
@vvolodin
vvolodin / gist:86642fb0307cff8f7d8c
Created August 8, 2014 08:15
Quick proxy server with request hostname rewrite
var http = require('http'),
httpProxy = require('http-proxy');
var proxy = httpProxy.createProxy();
proxy.on('proxyRes', function (res) {
//console.log('RAW Response from the target', JSON.stringify(res.headers, true, 2));
});
proxy.on('proxyReq', function (req) {
console.log('BEFORE Request from the WEB', JSON.stringify(req._headers, true, 2));
req._headers.host = "localhost:44320";
Spy Game, 2001
The Good Shepherd (2006)
The Ghost Writer, 2010
The Spy Who Came in from the Cold (1965)
Ronin (1998)
Tinker Tailor Soldier Spy (2011)
The American (2010)