feat: fix test proxy
This commit is contained in:
@@ -1,19 +1,23 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
it('generates secure Filament asset URLs behind the production proxy', function () {
|
use Illuminate\Support\Facades\Route;
|
||||||
$response = $this
|
|
||||||
|
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'])
|
->withServerVariables(['REMOTE_ADDR' => '10.0.0.2'])
|
||||||
->withHeaders([
|
->withHeaders([
|
||||||
'X-Forwarded-Host' => 'dailyapi.leonmorival.xyz',
|
'X-Forwarded-Host' => 'dailyapi.leonmorival.xyz',
|
||||||
'X-Forwarded-Port' => '443',
|
'X-Forwarded-Port' => '443',
|
||||||
'X-Forwarded-Proto' => 'https',
|
'X-Forwarded-Proto' => 'https',
|
||||||
])
|
])
|
||||||
->get('/dashboard/login');
|
->getJson('/_test/trusted-proxy-asset-url')
|
||||||
|
|
||||||
$response
|
|
||||||
->assertOk()
|
->assertOk()
|
||||||
->assertSee(
|
->assertJsonPath(
|
||||||
'href="https://dailyapi.leonmorival.xyz/build/assets/',
|
'url',
|
||||||
escape: false,
|
'https://dailyapi.leonmorival.xyz/build/assets/theme.css',
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user