diff Sources/Plugin.cpp @ 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 36049c04ee27
children 5f8d66f7fa06
line wrap: on
line diff
--- 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());
 
     {