Files
ntspi-app/app/Providers/ForceHttpsServiceProvider.php
2026-03-20 21:47:02 +05:00

29 lines
454 B
PHP
Executable File

<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class ForceHttpsServiceProvider extends ServiceProvider
{
/**
* Register services.
*/
public function register(): void
{
//
}
/**
* Bootstrap services.
*/
public function boot(): void
{
if (env('NGINX_ENV') === 'prod') {
URL::forceScheme('https');
}
}
}