http-route-proxy
Convenient HTTP/HTTPS route proxy for cross-domain request, request forward.Support using as express connect middleware.
Installing
npm install http-route-proxy
Testing
npm test
Using http-route-proxy
Sample:
var proxyServer = ; /** * proxy configs */proxyServer;
Set Headers
proxyServer;
Using HTTPS
proxyServer;// orproxyServer;
Forward By Request Path
Forward to various host on matching the path action
proxyServer;
Using as express connect middleware
express app.js config: Push it on the first of connect
app;app;app;app;app;app;app;
Change Log
Version 0.2.0 - 2015/08/26
Version 0.1.1 - 2013/12/30
Version 0.1.0 - 2013/12/28
Version 0.0.6-1 - 2013/12/26
- Feature: route field isn't necessary and it has defualt value of
['/']
Version 0.0.6 - 2013/12/26
Version 0.0.5-1 - 2013/12/26
Version 0.0.5 - 2013/12/25
Version 0.0.4 - 2013/12/18
License
The MIT License (MIT)
Copyright (c) 2013 guankaishe
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.