Files
star-cloud/app/Http/Middleware/TrustProxies.php
sky121113 21e064ff91
All checks were successful
star-cloud-deploy-demo / deploy-demo (push) Successful in 44s
[FIX] 強制 HTTPS 與信任代理以修正 Mixed Content 問題,並加入 CI/CD 自動同步 main 邏輯
2026-03-06 17:16:00 +08:00

29 lines
655 B
PHP

<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array<int, string>|string|null
*/
protected $proxies = '*';
/**
* The headers that should be used to detect proxies.
*
* @var int
*/
protected $headers =
Request::HEADER_X_FORWARDED_FOR |
Request::HEADER_X_FORWARDED_HOST |
Request::HEADER_X_FORWARDED_PORT |
Request::HEADER_X_FORWARDED_PROTO |
Request::HEADER_X_FORWARDED_AWS_ELB;
}