feat: trusproxies
CI / 🧪 Tests Laravel (push) Failing after 2m9s
CI / 🐳 Build & Push Image (push) Has been skipped

This commit is contained in:
2026-08-07 13:28:25 +02:00
parent 2ece4b6e3e
commit 52818e50fb
2 changed files with 20 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up',
)
->withMiddleware(function (Middleware $middleware): void {
$middleware->trustProxies(at: '*');
$middleware->prepend(\App\Http\Middleware\SetLocale::class);
$middleware->alias([
'verified' => \App\Http\Middleware\EnsureEmailIsVerified::class,
+19
View File
@@ -0,0 +1,19 @@
<?php
it('generates secure Filament asset URLs behind the production proxy', function () {
$response = $this
->withServerVariables(['REMOTE_ADDR' => '10.0.0.2'])
->withHeaders([
'X-Forwarded-Host' => 'dailyapi.leonmorival.xyz',
'X-Forwarded-Port' => '443',
'X-Forwarded-Proto' => 'https',
])
->get('/dashboard/login');
$response
->assertOk()
->assertSee(
'href="https://dailyapi.leonmorival.xyz/build/assets/',
escape: false,
);
});