From b23e8295d327a654eedb78eff7fe47e1b6173c16 Mon Sep 17 00:00:00 2001 From: Uwe Schmidt Date: Wed, 3 May 2023 23:51:07 +0200 Subject: [PATCH] Propagate updated ajax headers by default --- src/tiledimage.js | 3 +++ src/viewer.js | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/tiledimage.js b/src/tiledimage.js index 3518d272..24583e4d 100644 --- a/src/tiledimage.js +++ b/src/tiledimage.js @@ -1013,6 +1013,9 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag * TODO */ setAjaxHeaders: function(ajaxHeaders, propagate){ + if (propagate === undefined) { + propagate = true; + } // use same headers if provided 'ajaxHeaders' is invalid (useful for propagation) if ($.isPlainObject(ajaxHeaders)) { diff --git a/src/viewer.js b/src/viewer.js index 8e2eeaa1..75113dea 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -982,6 +982,10 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype, * TODO */ setAjaxHeaders: function(ajaxHeaders, propagate){ + if (propagate === undefined) { + propagate = true; + } + if ($.isPlainObject(ajaxHeaders)) { this.ajaxHeaders = ajaxHeaders; }