How can I get EmberCLI to proxy to a POW server? I'm using ember-cli master with the new explicit proxies (https://github.com/stefanpenner/ember-cli/pull/1530). This for example doesn't work:
var Proxy = require('http-proxy');
// For options, see:
// https://github.com/nodejitsu/node-http-proxy
var proxy = Proxy.createProxyServer({});
module.exports = function(app) {
app.use('/', function(req, res, next){
proxy.web(req, res, { target: 'http://api.mywebsite.dev' });
})
};
However, if I change my target to localhost, everything works fine:
var Proxy = require('http-proxy');
// For options, see:
// https://github.com/nodejitsu/node-http-proxy
var proxy = Proxy.createProxyServer({});
module.exports = function(app) {
app.use('/', function(req, res, next){
proxy.web(req, res, { target: 'http://localhost:9292' });
})
};