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
This commit is contained in:
parent
2eab5749ea
commit
287520ad7b
1 changed files with 4 additions and 0 deletions
|
|
@ -5,6 +5,7 @@ namespace App\Providers;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
|
use Illuminate\Support\Facades\URL;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
use Intervention\Image\ImageManager;
|
use Intervention\Image\ImageManager;
|
||||||
use Lcobucci\JWT\Configuration;
|
use Lcobucci\JWT\Configuration;
|
||||||
|
|
@ -80,5 +81,8 @@ class AppServiceProvider extends ServiceProvider
|
||||||
|
|
||||||
// Turn on Eloquent strict mode when developing
|
// Turn on Eloquent strict mode when developing
|
||||||
Model::shouldBeStrict(! $this->app->isProduction());
|
Model::shouldBeStrict(! $this->app->isProduction());
|
||||||
|
|
||||||
|
// Force HTTPS URL generation in production
|
||||||
|
URL::forceHttps($this->app->isProduction());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue