feat: fix test proxy
CI / 🧪 Tests Laravel (push) Successful in 2m2s
CI / 🐳 Build & Push Image (push) Successful in 37s

This commit is contained in:
2026-08-07 13:35:47 +02:00
parent 52818e50fb
commit 792a6c1b05
+12 -8
View File
@@ -1,19 +1,23 @@
<?php
it('generates secure Filament asset URLs behind the production proxy', function () {
$response = $this
use Illuminate\Support\Facades\Route;
it('generates secure asset URLs behind the production proxy', function () {
Route::get('/_test/trusted-proxy-asset-url', fn () => response()->json([
'url' => asset('build/assets/theme.css'),
]));
$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
->getJson('/_test/trusted-proxy-asset-url')
->assertOk()
->assertSee(
'href="https://dailyapi.leonmorival.xyz/build/assets/',
escape: false,
->assertJsonPath(
'url',
'https://dailyapi.leonmorival.xyz/build/assets/theme.css',
);
});