ソースを参照

Merge branch 'fix/cache_script' into 'develop'

Merge of fix/cache_script to develop 修复缓存资源的正则表达式判断的bug

See merge request o2oa/o2oa!1385
胡起 5 年 前
コミット
ab9ac3b775
2 ファイル変更3 行追加1 行削除
  1. 1 0
      o2web/source/o2_core/o2.js
  2. 2 1
      o2web/source/o2_core/o2/o2.core.js

+ 1 - 0
o2web/source/o2_core/o2.js

@@ -1258,6 +1258,7 @@
         //if (Browser.name == "ie")
         if (_cacheUrls.length){
             for (var i=0; i<_cacheUrls.length; i++){
+                _cacheUrls[i].lastIndex = 0;
                 if (_cacheUrls[i].test(address)){
                     noCache = false;
                     break;

+ 2 - 1
o2web/source/o2_core/o2/o2.core.js

@@ -291,7 +291,7 @@
     //    /jaxrs\/script/ig,
         /jaxrs\/script\/.+\/app\/.+\/imported/ig,
         /jaxrs\/script\/portal\/.+\/name\/.+\/imported/ig,
-        /jaxrs\/script\/[\S\s]+\/application\/[\S\s]+\/imported/,
+        /jaxrs\/script\/[\S\s]+\/application\/[\S\s]+\/imported/ig,
         /jaxrs\/page\/.+\/portal\/.+/ig
         // /jaxrs\/authentication/ig
         // /jaxrs\/statement\/.*\/execute\/page\/.*\/size\/.*/ig
@@ -307,6 +307,7 @@
         //if (Browser.name == "ie")
         if (_cacheUrls.length){
             for (var i=0; i<_cacheUrls.length; i++){
+                _cacheUrls[i].lastIndex = 0;
                 if (_cacheUrls[i].test(address)){
                     noCache = false;
                     break;