Publish immutable FrankenPHP images to GHCR, auto-deploy staging after CI, and promote the same digest to production with smoke, backup, and rollback docs. Co-authored-by: Cursor <cursoragent@cursor.com>
23 lines
513 B
PHP
23 lines
513 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Feature;
|
|
|
|
use Tests\TestCase;
|
|
|
|
class TrustedProxyTest extends TestCase
|
|
{
|
|
public function test_forwarded_proto_https_is_recognized_behind_proxy(): void
|
|
{
|
|
$response = $this->get('/up', [
|
|
'HTTP_X_FORWARDED_PROTO' => 'https',
|
|
'HTTP_X_FORWARDED_FOR' => '203.0.113.10',
|
|
]);
|
|
|
|
$response->assertOk();
|
|
$this->assertTrue(request()->secure());
|
|
$this->assertSame('203.0.113.10', request()->ip());
|
|
}
|
|
}
|