Force HTTPS URL generation in production #107
1 changed files with 4 additions and 0 deletions
Force HTTPS URL generation in production
Uses Laravel's built-in URL::forceHttps() so route(), url(), and asset() always generate https:// links in production, without affecting local dev. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RP5TeZbk9KS754xuJMobjE
commit
287520ad7b
|
|
@ -5,6 +5,7 @@ namespace App\Providers;
|
|||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Pagination\LengthAwarePaginator;
|
||||
use Illuminate\Support\Collection;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Intervention\Image\ImageManager;
|
||||
use Lcobucci\JWT\Configuration;
|
||||
|
|
@ -80,5 +81,8 @@ class AppServiceProvider extends ServiceProvider
|
|||
|
||||
// Turn on Eloquent strict mode when developing
|
||||
Model::shouldBeStrict(! $this->app->isProduction());
|
||||
|
||||
// Force HTTPS URL generation in production
|
||||
URL::forceHttps($this->app->isProduction());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue