set headers

This commit is contained in:
Nayan Ambali 2013-08-17 15:34:11 +05:30
parent 370f5fe5f8
commit c4d1a3a736
2 changed files with 10 additions and 0 deletions

View File

@ -43,6 +43,7 @@ define(['underscore', 'mifosX'], function() {
return list.concat(_.map(components[group], function(name) { return group + "/" + name; }));
}, [
'routes',
'setHeaders',
'webstorage-configuration'
]));
});

9
js/setHeaders.js Normal file
View File

@ -0,0 +1,9 @@
(function(mifosX) {
var defineHeaders = function($httpProvider) {
$httpProvider.defaults.headers.common['X-Mifos-Platform-TenantId'] = 'default';
$httpProvider.defaults.headers.common['Content-Type'] = 'application/json; charset=utf-8';
};
mifosX.ng.application.config(defineHeaders).run(function($log) {
$log.info("http deaders are set");
});
}(mifosX || {}));