AngularJS $resource, internet explorer and authorization header
1,193 views
Skip to first unread message
siriss
unread,
Dec 17, 2012, 8:58:16 AM12/17/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
Hi
I hava en angularjs web app with login form. The app uses $resource for sending requests to server on another domain. I am putting the user name and password into Authorization header like so: $http.defaults.headers.common['Authorization'] = "Basic " + Base64.encode(credentials); before calling the service. This works fine in firefox, chrome and safari but not in internet explorer 9 and 8. IE10 is working. IE 9 and 8 does not send anything to the server unless I set $http.defaults.useXDomain = true - but even with this set the Authorization header is stripped off. But this causes IE 10 to fail. The server responds with http status 401 and WWW-Authenticate header, but no additional request with Authorization header is set.
I really appreciate if someone has a solution to this or some hints to how I could solve this problem.
Best regards
siriss
Pawel Kozlowski
unread,
Dec 18, 2012, 4:08:59 AM12/18/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ang...@googlegroups.com
Hi!
On Mon, Dec 17, 2012 at 2:58 PM, siriss <siren...@gmail.com> wrote:
> I set $http.defaults.useXDomain = true