{"action":"opened","issue":{"url":"https://api.github.com/repos/nodejitsu/node-http-proxy/issues/841","labels_url":"https://api.github.com/repos/nodejitsu/node-http-proxy/issues/841/labels{/name}","comments_url":"https://api.github.com/repos/nodejitsu/node-http-proxy/issues/841/comments","events_url":"https://api.github.com/repos/nodejitsu/node-http-proxy/issues/841/events","html_url":"https://github.com/nodejitsu/node-http-proxy/issues/841","id":90329175,"number":841,"title":"Imitate Apache proxypass","user":{"login":"benjick","id":430872,"avatar_url":"https://avatars.githubusercontent.com/u/430872?v=3","gravatar_id":"","url":"https://api.github.com/users/benjick","html_url":"https://github.com/benjick","followers_url":"https://api.github.com/users/benjick/followers","following_url":"https://api.github.com/users/benjick/following{/other_user}","gists_url":"https://api.github.com/users/benjick/gists{/gist_id}","starred_url":"https://api.github.com/users/benjick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjick/subscriptions","organizations_url":"https://api.github.com/users/benjick/orgs","repos_url":"https://api.github.com/users/benjick/repos","events_url":"https://api.github.com/users/benjick/events{/privacy}","received_events_url":"https://api.github.com/users/benjick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-23T08:57:55Z","updated_at":"2015-06-23T08:57:55Z","closed_at":null,"body":"Hi\r\n\r\nI'm trying to imitate Apache ProxyPass with this module, and I'm not sure what I have to do. Is the docs lacking or am I just way off?\r\n\r\nThis is the code I have:\r\n\r\n```js\r\nvar httpProxy = require('http-proxy');\r\n\r\nvar proxy = httpProxy.createProxy();\r\n\r\nvar options = {  \r\n  '/test1': 'http://localhost:8001',\r\n  '/test2': 'http://localhost:8002'\r\n}\r\n\r\nrequire('http').createServer(function(req, res) {  \r\n  proxy.web(req, res, {\r\n    target: options[req.headers.host],\r\n    hostnameOnly: false\r\n  });\r\n}).listen(8003, function() {\r\n\tconsole.log(\"Proxy serving\")\r\n});\r\n```\r\n\r\nI've read through some old issues and they mention `pathnameOnly` but there is nothing in the docs about this. I've also read https://blog.nodejitsu.com/node-http-proxy-1dot0/ from where my above code is."}}