我的应用程序分布在3台服务器上:
我正在使用BackboneJS作为客户端代码。
是否可以使用javascript为每个相对图片网址添加前缀,因为ajax请求可以使用:
$.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
options.url = 'http://localhost:3000' + options.url;
});
所以我可以有类似的东西:
<img src="items/1.png"> //get it on http://localhost:3001 instead of default http://localhost:4000
感谢。