mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-26 01:58:06 +02:00
Added withCredentials parameter and passing it to xhr requests
This commit is contained in:
parent
4d01ff4079
commit
08737375f8
5 changed files with 10 additions and 2 deletions
|
@ -44,6 +44,7 @@ var NetworkManager = (function NetworkManagerClosure() {
|
|||
this.url = url;
|
||||
args = args || {};
|
||||
this.httpHeaders = args.httpHeaders || {};
|
||||
this.withCredentials = args.withCredentials || false;
|
||||
this.getXhr = args.getXhr ||
|
||||
function NetworkManager_getXhr() {
|
||||
//#if B2G
|
||||
|
@ -96,6 +97,7 @@ var NetworkManager = (function NetworkManagerClosure() {
|
|||
};
|
||||
|
||||
xhr.open('GET', this.url);
|
||||
xhr.withCredentials = this.withCredentials;
|
||||
for (var property in this.httpHeaders) {
|
||||
var value = this.httpHeaders[property];
|
||||
if (typeof value === 'undefined') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue