php 헛다리/Laravel9 헛다리
라라벨9 https 로 무조건 설정하기
후닝요
2025. 3. 27. 22:51
728x90
라라벨9 https 로 무조건 설정하기
/app/Providers/AppServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Register any application services.
*
* @return void
*/
public function register()
{
//
}
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
// 환경에 상관없이 HTTPS 강제 적용
URL::forceScheme('https'); // <<< 추가
}
}
728x90