2016-06-14 52 views
0

如何防止Ember代理特定请求?忽略特定请求的代理

我有一个API监听3000端口,所以当我为我的灰烬应用程序我运行:

ember server --proxy http://localhost:3000 

一切运行时,我的应用程序发送引导GET请求我的API(这不只是罚款意在处理它们)。这是我得到的错误:

GET /assets/bootstrap.css.map - - ms - - 
Error proxying to http://localhost:3000 
connect ECONNREFUSED 127.0.0.1:3000 

页正确结束了加载,但它需要很长的时间,因为它在等待我的API超时请求。

+0

这听起来像一个错误,你怎么包括bootstrap? –

+0

要么包含该文件,要么让服务器以404响应。但是,您决不应该使用'ember serve'进行生产! – Lux

+0

我包括bootstrap在ember-cli-build.js中: app.import(app.bowerDirectory +'/bootstrap/dist/css/bootstrap.css'); app.import(app.bowerDirectory +'/bootstrap/dist/js/bootstrap.js'); app.import(app.bowerDirectory +'/bootstrap/dist/fonts/glyphicons-halflings-regular.woff',{ destDir:'fonts' }); – goodoldneon777

回答

0

问题消失时,我从bootstrap.css删除/*# sourceMappingURL=bootstrap.css.map */