bricks-cli
Version:
Command line tool for developing ambitious ember.js apps
41 lines (40 loc) • 2.19 kB
JSON
{
"name": "proxy-middleware",
"version": "0.5.0",
"description": "http(s) proxy as connect middleware",
"main": "index.js",
"scripts": {
"test": "mocha"
},
"repository": {
"type": "git",
"url": "https://github.com/superjoe30/connect-proxy"
},
"keywords": [
"connect",
"proxy",
"middleware",
"https",
"http",
"ssl"
],
"author": {
"name": "Andrew Kelley"
},
"license": "BSD",
"engines": {
"node": ">=0.8.0"
},
"devDependencies": {
"mocha": "~1.6.0",
"connect": "~2.6.0"
},
"readme": "[](http://travis-ci.org/superjoe30/connect-proxy)\n\n### Usage:\n\n```js\nvar connect = require('connect')\n , url = require('url')\n , 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\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\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",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/superjoe30/connect-proxy/issues"
},
"homepage": "https://github.com/superjoe30/connect-proxy",
"_id": "proxy-middleware@0.5.0",
"_from": "proxy-middleware@^0.5.0"
}