31 lines
992 B
PHP
31 lines
992 B
PHP
<?php
|
|
|
|
use Illuminate\Foundation\Application;
|
|
use Illuminate\Foundation\Configuration\Exceptions;
|
|
use Illuminate\Foundation\Configuration\Middleware;
|
|
|
|
return Application::configure(basePath: dirname(__DIR__))
|
|
->withRouting(
|
|
web: __DIR__.'/../routes/web.php',
|
|
commands: __DIR__.'/../routes/console.php',
|
|
health: '/up',
|
|
)
|
|
->withMiddleware(function (Middleware $middleware): void {
|
|
// NAS reverse proxy / 로드밸런서 뒤에서 HTTPS를 올바르게 인식하게 함
|
|
$middleware->trustProxies(at: [
|
|
'192.168.100.0/24', // NAS/내부 대역 (필요시 조정)
|
|
'127.0.0.0/8',
|
|
'10.0.0.0/8',
|
|
'172.16.0.0/12',
|
|
]);
|
|
|
|
// Host header 공격 방지: 우리 도메인만 허용
|
|
$middleware->trustHosts(at: [
|
|
'four.syye.net',
|
|
'shot.syye.net',
|
|
]);
|
|
})
|
|
->withExceptions(function (Exceptions $exceptions): void {
|
|
//
|
|
})->create();
|