changeset 33:1c8515124f27

patch OHIF for https://github.com/OHIF/Viewers/issues/3928
author Alain Mazy <am@osimis.io>
date Thu, 14 Mar 2024 10:04:02 +0100
parents 640041ec70aa
children e2d1d82b79f3
files NEWS Sources/Plugin.cpp
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Thu Jan 04 15:39:16 2024 +0100
+++ b/NEWS	Thu Mar 14 10:04:02 2024 +0100
@@ -1,6 +1,9 @@
 Pending changes in the mainline
 ===============================
 
+* Patching OHIF code for https://github.com/OHIF/Viewers/issues/3928
+  to allow using token args in url.
+
 
 Version 1.2 (2024-01-04)
 ========================
--- a/Sources/Plugin.cpp	Thu Jan 04 15:39:16 2024 +0100
+++ b/Sources/Plugin.cpp	Thu Mar 14 10:04:02 2024 +0100
@@ -249,6 +249,13 @@
 
     std::unique_ptr<std::string> item(new std::string);
     ReadStaticAsset(*item, path);
+
+    // patch OHIF for https://github.com/OHIF/Viewers/issues/3928
+    if (Orthanc::Toolbox::StartsWith(path, "app.bundle."))
+    {
+      boost::replace_all(*item, "window.location.origin + location.pathname + location.search", "window.location.origin + window.location.pathname + location.search");
+    }
+
     OrthancPluginAnswerBuffer(context, output, item->c_str(), item->size(), mime.c_str());
 
     {