[jquery.form.js - v2.43] .ajaxForm and "Authorization" header

[jquery.form.js - v2.43] .ajaxForm and "Authorization" header

Hi all,

I am trying to user .ajaxForm() together with "Authorization" header.
Basically here is whay I am doing :

  1. $('#myForm').ajaxForm({
  2.     beforeSend: function(xhr) {
  3.         var authRequest = 'Basic '+ Base64.encode('user:pass')
  4.         xhr.setRequestHeader('Authorization', authRequest);
  5.     },
  6.     beforeSubmit: function(formData, jqForm, options) {
  7.         //...
  8.     },
  9.     success: function(data) {
  10.         //...
  11.     }
  12. });
But, the header isn't passed to the request...

Some ideas I have :
  • I am on https, is there an issue ?
  • When run the page, Google Chrome throws this error :
Unsafe JavaScript attempt to access frame with URL chrome://chromewebdata/ from frame with URL https://localhost:1234/. Domains, protocols and ports must match.

Maybe an issue here ? How can I solve this ?