From f30f1da20150fbe577b8f3a74e779ec7b84c97c6 Mon Sep 17 00:00:00 2001 From: xiaomlove Date: Sat, 16 Mar 2024 22:17:31 +0800 Subject: [PATCH] HTTP_X_FORWARDED_PROTO first --- nexus/Nexus.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nexus/Nexus.php b/nexus/Nexus.php index 9755bc7b..b78d7390 100644 --- a/nexus/Nexus.php +++ b/nexus/Nexus.php @@ -95,7 +95,7 @@ final class Nexus return $this->script == 'announce'; } - public function incrementLogSequence() + public function incrementLogSequence(): void { $this->logSequence++; } @@ -108,7 +108,7 @@ final class Nexus return $result; } - public function getRequestSchema() + public function getRequestSchema(): string { $schema = $this->retrieveFromServer(['HTTP_X_FORWARDED_PROTO', 'REQUEST_SCHEME', 'HTTP_SCHEME']); if (empty($schema)) { @@ -122,7 +122,7 @@ final class Nexus public function getRequestHost(): string { - $host = $this->retrieveFromServer(['HTTP_HOST', 'host', 'HTTP_X_FORWARDED_HOST'], true); + $host = $this->retrieveFromServer(['HTTP_X_FORWARDED_HOST', 'HTTP_HOST', 'host'], true); return $this->getFirst(strval($host)); }