Commit 29d53586 authored by Mahmoud Aglan's avatar Mahmoud Aglan

fix(infra): trust reverse proxy headers for correct HTTPS redirect URLs

CapRover terminates SSL before forwarding to the container, so Laravel
needs to trust the X-Forwarded-* headers to generate https:// URLs in
redirects. Without this, all redirects pointed to http:// which then
triggered another redirect loop through CapRover's force-SSL setting.
Co-Authored-By: 's avatarClaude Opus 4.6 <noreply@anthropic.com>
parent b1a00cdb
......@@ -12,6 +12,8 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware) {
$middleware->trustProxies(at: '*');
$middleware->web(append: [
\App\Shared\Middleware\SetLocale::class,
\App\Shared\Middleware\SecurityHeaders::class,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment