|
@@ -108,10 +108,9 @@ module.exports = {
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- // Match any same-origin request that contains 'api'.
|
|
|
// logo 地址会变
|
|
|
urlPattern: new RegExp(
|
|
|
- "^https://ecs-test-static.qmth.com.cn/org_logo/.*/.*"
|
|
|
+ "^https://ecs(-test)?-static.qmth.com.cn/org_logo/.*/.*"
|
|
|
),
|
|
|
handler: "cacheFirst",
|
|
|
options: {
|
|
@@ -120,6 +119,22 @@ module.exports = {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ // 作答文件的地址
|
|
|
+ urlPattern: new RegExp(
|
|
|
+ "^https://ecs(-test)?-static.qmth.com.cn/oe-answer-file/.*"
|
|
|
+ ),
|
|
|
+ handler: "cacheFirst",
|
|
|
+ options: {
|
|
|
+ cacheableResponse: {
|
|
|
+ statuses: [0, 200],
|
|
|
+ },
|
|
|
+ cacheName: "oe-answer-file",
|
|
|
+ expiration: {
|
|
|
+ maxAgeSeconds: 4 * 60 * 60,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
{
|
|
|
urlPattern: /\/models\/.*\/.*\.json/,
|
|
|
handler: "cacheFirst",
|