Skip to content

Commit

Permalink
Update CORS policies
Browse files Browse the repository at this point in the history
  • Loading branch information
blokhin committed Jan 15, 2025
1 parent 2359e30 commit 0e6895c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src_js/ptable.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ function ajax_download(api, url, callback){
}
}
xmlhttp.open("GET", url);
xmlhttp.withCredentials = true;
xmlhttp.send(1);
}

Expand Down
8 changes: 8 additions & 0 deletions src_js/wmcore.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ var wmutils = OptimadeNLP();

var wmgui = window.wmgui || {};

/**
* Support proxies
*/

$.ajaxSetup({
xhrFields: {withCredentials: true}
});

/**
* Extending base types with the utilities
*/
Expand Down
1 change: 1 addition & 0 deletions webassets/iframe_cifplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
}
}
xmlhttp.open("GET", url);
xmlhttp.withCredentials = true;
xmlhttp.send(1);
}

Expand Down
2 changes: 1 addition & 1 deletion webassets/visavis.js
Original file line number Diff line number Diff line change
Expand Up @@ -20503,7 +20503,7 @@ var $;
static fetch_plot_json(request) {
if (request == null)
return null;
const json = $mol_fetch.json(request);
const json = $mol_fetch.json(request, { credentials: 'include' });
if (json && json.error)
return $mol_fail(new $mol_data_error(json.error));
if (!json || !json.use_visavis_type)
Expand Down

0 comments on commit 0e6895c

Please sign in to comment.