comparison 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
comparison
equal deleted inserted replaced
32:640041ec70aa 33:1c8515124f27
247 247
248 // This resource has not been cached yet 248 // This resource has not been cached yet
249 249
250 std::unique_ptr<std::string> item(new std::string); 250 std::unique_ptr<std::string> item(new std::string);
251 ReadStaticAsset(*item, path); 251 ReadStaticAsset(*item, path);
252
253 // patch OHIF for https://github.com/OHIF/Viewers/issues/3928
254 if (Orthanc::Toolbox::StartsWith(path, "app.bundle."))
255 {
256 boost::replace_all(*item, "window.location.origin + location.pathname + location.search", "window.location.origin + window.location.pathname + location.search");
257 }
258
252 OrthancPluginAnswerBuffer(context, output, item->c_str(), item->size(), mime.c_str()); 259 OrthancPluginAnswerBuffer(context, output, item->c_str(), item->size(), mime.c_str());
253 260
254 { 261 {
255 // Store the resource into the cache 262 // Store the resource into the cache
256 boost::unique_lock<boost::shared_mutex> lock(mutex_); 263 boost::unique_lock<boost::shared_mutex> lock(mutex_);