mirror of
https://github.com/rico-vz/HeimerdingerLoL.git
synced 2025-12-08 03:00:50 +01:00
fix: only clear cloudflare on prod
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Console\Commands;
|
|||||||
use GuzzleHttp\Exception\GuzzleException;
|
use GuzzleHttp\Exception\GuzzleException;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use GuzzleHttp\Client;
|
use GuzzleHttp\Client;
|
||||||
|
use Illuminate\Support\Facades\App;
|
||||||
|
|
||||||
class CloudflarePurgeCommand extends Command
|
class CloudflarePurgeCommand extends Command
|
||||||
{
|
{
|
||||||
@@ -17,6 +18,7 @@ class CloudflarePurgeCommand extends Command
|
|||||||
*/
|
*/
|
||||||
public function handle(): void
|
public function handle(): void
|
||||||
{
|
{
|
||||||
|
if (App::environment('production')) {
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
$cf_zone_id = config('cloudflare.cf_zone_id');
|
$cf_zone_id = config('cloudflare.cf_zone_id');
|
||||||
$cf_auth_bearer = config('cloudflare.cf_auth_bearer');
|
$cf_auth_bearer = config('cloudflare.cf_auth_bearer');
|
||||||
@@ -44,3 +46,4 @@ class CloudflarePurgeCommand extends Command
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user