Files
daily-meal-api/tests/Feature/TrustedProxyTest.php
T
leonm 52818e50fb
CI / 🧪 Tests Laravel (push) Failing after 2m9s
CI / 🐳 Build & Push Image (push) Has been skipped
feat: trusproxies
2026-08-07 13:28:25 +02:00

20 lines
559 B
PHP

<?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,
);
});