I am a novice to angular.js, and I am trying to add some headers to a request:
var config = {headers: {
\'Authorization\': \'Basic d2VudHdvcnR
What you see for OPTIONS request is fine. Authorisation headers are not exposed in it.
But in order for basic auth to work you need to add: withCredentials = true; to your var config.
From the AngularJS $http documentation:
withCredentials -
{boolean}- whether to to set thewithCredentialsflag on the XHR object. See requests with credentials for more information.