Created
November 23, 2015 01:31
-
-
Save axshia/338bd7c185439f27ff68 to your computer and use it in GitHub Desktop.
GeneratorGulpAngularのローカル開発時のプロキシ設定例
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = { | |
target: 'http://dev.webreader.jp', // target host | |
changeOrigin: true, // needed for virtual hosted sites | |
ws: false, // proxy websockets | |
pathRewrite: { | |
//'^/api': '/new/api' // rewrite paths | |
}, | |
proxyTable: { | |
// when request.headers.host == 'dev.localhost:3000', | |
// override target 'http://www.example.org' to 'http://localhost:8000' | |
'localhost:3000': 'http://dev.webreader.jp' | |
} | |
}; | |
server.middleware = proxyMiddleware('/api', options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment