markmarijnissen/cordova-app-loader

Basic Auth

Open

#38 创建于 2015年4月24日

在 GitHub 查看
 (4 评论) (0 反应) (0 负责人)JavaScript (137 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (656 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

URLS with basic auth. are not working right

like https://username:password@domain/mainfest.json

Found one issue in the bootstrap.js xhr.setRequestHeader("Authorization", "Basic ...);

is missing.

Also the cordova file loader does not set the right headers for downloading

authHeaderValue = function(username, password) {
    var tok = username + ':' + password;
    var hash = btoa(tok);
    return "Basic " + hash;
};

options.headers = {'Authorization': authHeaderValue('Bob', '1234') };

贡献者指南