Skip to content

Commit

Permalink
fix: enforcing url https redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
CS76 committed May 30, 2024
1 parent 822760b commit b0fdbc9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/Providers/AppServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Filament\Facades\Filament;
use Filament\Navigation\UserMenuItem;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
Expand All @@ -23,6 +24,10 @@ public function register(): void
*/
public function boot(): void
{
if ($this->app->environment('production') || $this->app->environment('development')) {
URL::forceScheme('https');
}

Filament::serving(function () {
Filament::registerUserMenuItems([
UserMenuItem::make()
Expand Down

0 comments on commit b0fdbc9

Please sign in to comment.