{"name":"proxy-middleware","version":"0.13.1","description":"http(s) proxy as connect middleware","main":"index.js","scripts":{"test":"mocha"},"repository":{"type":"git","url":"git+https://github.com/andrewrk/connect-proxy.git"},"keywords":["connect","proxy","middleware","https","http","ssl"],"author":{"name":"Andrew Kelley"},"license":"MIT","engines":{"node":">=0.8.0"},"devDependencies":{"connect":"~3.3.5","mocha":"~2.2.5","serve-static":"~1.9.3"},"gitHead":"92ac1d4bfd54b7336a1013ed251079a57ee9e4ba","bugs":{"url":"https://github.com/andrewrk/connect-proxy/issues"},"homepage":"https://github.com/andrewrk/connect-proxy#readme","_id":"proxy-middleware@0.13.1","_shasum":"86d0ae4b364688980b761019d8022aa797070703","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"superjoe","email":"superjoe30@gmail.com"},"dist":{"shasum":"86d0ae4b364688980b761019d8022aa797070703","tarball":"http://registry-npm.ywwl.com/proxy-middleware/download/proxy-middleware-0.13.1.tgz","integrity":"sha512-18EgFJS60tHNVXtIluzsa2/rz8NrJUPHTRcTpdpEI9E+0YkKwgcNNz2F5M4yBADOEYA69D6Iqr6weMUQfZzi3Q==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEeR0Bd6Qp9BR3TmTYzneGlYSYU9pw/RtcZg8TXPgtw2AiEAr7HnZ5ygUBkBrXK0xYiQzrrBID5G8eitWAzoBz6efEc="}],"size":3413,"noattachment":false,"key":"/proxy-middleware/-/proxy-middleware-0.13.1.tgz"},"maintainers":[{"name":"superjoe","email":"superjoe30@gmail.com"}],"directories":{},"readme":"[![Build Status](https://secure.travis-ci.org/andrewrk/node-proxy-middleware.png)](http://travis-ci.org/andrewrk/node-proxy-middleware)\n\n### Usage:\n\n```js\nvar connect = require('connect');\nvar url = require('url');\nvar proxy = require('proxy-middleware');\n\nvar app = connect();\napp.use('/api', proxy(url.parse('https://example.com/endpoint')));\n// now requests to '/api/x/y/z' are proxied to 'https://example.com/endpoint/x/y/z'\n\n//same as example above but also uses a short hand string only parameter\napp.use('/api-string-only', proxy('https://example.com/endpoint'));\n```\n\n### Documentation:\n\n`proxyMiddleware(options)`\n\n`options` allows any options that are permitted on the [`http`](http://nodejs.org/api/http.html#http_http_request_options_callback) or [`https`](http://nodejs.org/api/https.html#https_https_request_options_callback) request options.\n\nOther options:\n- `route`: you can pass the route for connect middleware within the options, as well.\n- `via`: by default no [via header](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.45) is added. If you pass `true` for this option the local hostname will be used for the via header. You can also pass a string for this option in which case that will be used for the via header.\n- `cookieRewrite`: this option can be used to support cookies via the proxy by rewriting the cookie domain to that of the proxy server. By default cookie domains are not rewritten. The `cookieRewrite` option works as the `via` option - if you pass `true` the local hostname will be used, and if you pass a string that will be used as the rewritten cookie domain.\n- `preserveHost`: When enabled, this option will pass the Host: line from the incoming request to the proxied host. Default: `false`.\n\n### Usage with route:\n\n```js\nvar proxyOptions = url.parse('https://example.com/endpoint');\nproxyOptions.route = '/api';\n\nvar middleWares = [proxy(proxyOptions) /*, ...*/];\n\n// Grunt connect uses this method\nconnect(middleWares);\n```\n","publish_time":1438715488289,"_cnpm_publish_time":1438715488289,"dist-tags":{"latest":"0.15.0"}}