瀏覽代碼

Update ConfigCacheService, fix db issue

Daniel Supernault 4 年之前
父節點
當前提交
d2cb7d4770
共有 2 個文件被更改,包括 6 次插入0 次删除
  1. 4 0
      app/Services/ConfigCacheService.php
  2. 2 0
      config/instance.php

+ 4 - 0
app/Services/ConfigCacheService.php

@@ -44,6 +44,10 @@ class ConfigCacheService
 				'uikit.show_custom.js'
 			];
 
+			if(!config('instance.enable_cc')) {
+				return config($key);
+			}
+
 			if(!in_array($key, $allowed)) {
 				return config($key);
 			}

+ 2 - 0
config/instance.php

@@ -72,4 +72,6 @@ return [
 			'org' => env('COVID_LABEL_ORG', 'visit the WHO website')
 		]
 	],
+
+	'enable_cc' => env('ENABLE_CONFIG_CACHE', false)
 ];