tambah trust proxy
This commit is contained in:
@@ -11,6 +11,10 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware): void {
|
||||
// App berada di belakang reverse proxy (proxy host → Apache → Laravel),
|
||||
// jadi percaya header X-Forwarded-* supaya HTTPS, host & IP klien betul.
|
||||
$middleware->trustProxies(at: '*');
|
||||
|
||||
$middleware->alias([
|
||||
'role' => \App\Http\Middleware\EnsureRole::class,
|
||||
'profile.completed' => \App\Http\Middleware\EnsureProfileCompleted::class,
|
||||
|
||||
Reference in New Issue
Block a user