visuddhinanda 2 лет назад
Родитель
Сommit
0805c82f8d
2 измененных файлов с 9 добавлено и 4 удалено
  1. 7 4
      app/Console/Commands/ExportOffline.php
  2. 2 0
      config/mint.php

+ 7 - 4
app/Console/Commands/ExportOffline.php

@@ -128,10 +128,13 @@ class ExportOffline extends Command
                     ]);
         $info = array();
         $url = array();
-        $url[] = [
-                'link'=>'https://www.wikipali.cc/downloads/'.$zipFile,
-                'hostname'=>'阿里云·中国',
-            ];
+        foreach (config('mint.server.cdn_urls') as $key => $cdn) {
+            $url[] = [
+                    'link' => $cdn . '/' . $zipFile,
+                    'hostname' =>'cdn-' . $key,
+                ];
+        }
+
         //s3
         Storage::put($zipFile, file_get_contents($zipFullFileName));
         $s3Link = Storage::url($zipFile);

+ 2 - 0
config/mint.php

@@ -24,6 +24,8 @@ return [
         'assets' => env('ASSETS_SERVER', "localhost:9999"),
 
         'dashboard_base_path' => env('DASHBOARD_BASE_PATH', "http://127.0.0.1:3000/my"),
+
+        'cdn_urls' => explode(',',env('CDN_URLS', "https://www.wikipali.cc/downloads")),
     ],
 
     'cache' => [