Skip to content

Commit 525045e

Browse files
committed
Enforce HTTPS in production and staging
1 parent e204692 commit 525045e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/Providers/AppServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
namespace App\Providers;
44

5+
use App\Enums\Environment;
56
use App\Models\User;
67
use Illuminate\Http\Client\RequestException;
78
use Illuminate\Http\Resources\Json\JsonResource;
9+
use Illuminate\Support\Facades\URL;
810
use Illuminate\Support\Facades\Vite;
911
use Illuminate\Support\ServiceProvider;
1012
use Laravel\Pulse\Facades\Pulse;
@@ -20,6 +22,8 @@ class AppServiceProvider extends ServiceProvider
2022
{
2123
public function boot(): void
2224
{
25+
URL::forceHttps(in_array(app()->environment(), [Environment::PRODUCTION, Environment::STAGING]));
26+
2327
RequestException::dontTruncate();
2428

2529
JsonResource::withoutWrapping();

0 commit comments

Comments
 (0)