Files
amare/tests/Feature/TrustedProxyTest.php
Manoel Freitas 7f4ea01f4b feat: prepare Dokploy staging and production deploy pipeline (#6)
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>
2026-08-01 23:40:13 -03:00

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());
}
}