From 792a6c1b050818b6d8406872ca848252562852f1 Mon Sep 17 00:00:00 2001 From: Leon Morival Date: Fri, 7 Aug 2026 13:35:47 +0200 Subject: [PATCH] feat: fix test proxy --- tests/Feature/TrustedProxyTest.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/Feature/TrustedProxyTest.php b/tests/Feature/TrustedProxyTest.php index f515791..629d744 100644 --- a/tests/Feature/TrustedProxyTest.php +++ b/tests/Feature/TrustedProxyTest.php @@ -1,19 +1,23 @@ 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', ); });