Force HTTPS URLs in production
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Providers;
|
||||
|
||||
use App\Models\Setting;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\URL;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
@@ -21,6 +22,10 @@ class AppServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
if ($this->app->environment('production')) {
|
||||
URL::forceScheme('https');
|
||||
}
|
||||
|
||||
if (config('database.default') === 'sqlite') {
|
||||
DB::statement('PRAGMA journal_mode=WAL');
|
||||
DB::statement('PRAGMA synchronous=NORMAL');
|
||||
|
||||
Reference in New Issue
Block a user