如何配置路由器以处理xhr
和direct requests
到api。
使用案例:文件下载
我有RESTAPI
我试图使用<a>
操作链接标记下载文件 - &gt;单击解析为具有绝对URL的新选项卡/窗口。
我的webApp正在http://localhost:4200 proxying request
到http://localhost:44226投放
当我尝试使用网址http://localhost:4200/api/download/files/1点击api下载文件时
我收到错误:
无法识别的BULError:/ api / download / files / 1
const Router = Ember.Router.extend({
location: config.locationType // auto
});
Router.map(function() {
this.route('login');
this.route('logout');
});
export default Router;
任何指示如何继续/改变什么。