Propagate updated ajax headers by default

This commit is contained in:
Uwe Schmidt 2023-05-03 23:51:07 +02:00
parent 13603dd5f4
commit b23e8295d3
2 changed files with 7 additions and 0 deletions

View File

@ -1013,6 +1013,9 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
* TODO * TODO
*/ */
setAjaxHeaders: function(ajaxHeaders, propagate){ setAjaxHeaders: function(ajaxHeaders, propagate){
if (propagate === undefined) {
propagate = true;
}
// use same headers if provided 'ajaxHeaders' is invalid (useful for propagation) // use same headers if provided 'ajaxHeaders' is invalid (useful for propagation)
if ($.isPlainObject(ajaxHeaders)) { if ($.isPlainObject(ajaxHeaders)) {

View File

@ -982,6 +982,10 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
* TODO * TODO
*/ */
setAjaxHeaders: function(ajaxHeaders, propagate){ setAjaxHeaders: function(ajaxHeaders, propagate){
if (propagate === undefined) {
propagate = true;
}
if ($.isPlainObject(ajaxHeaders)) { if ($.isPlainObject(ajaxHeaders)) {
this.ajaxHeaders = ajaxHeaders; this.ajaxHeaders = ajaxHeaders;
} }