mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-24 03:57:22 +08:00
HTTP_X_FORWARDED_PROTO first
This commit is contained in:
+3
-3
@@ -95,7 +95,7 @@ final class Nexus
|
|||||||
return $this->script == 'announce';
|
return $this->script == 'announce';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function incrementLogSequence()
|
public function incrementLogSequence(): void
|
||||||
{
|
{
|
||||||
$this->logSequence++;
|
$this->logSequence++;
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ final class Nexus
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRequestSchema()
|
public function getRequestSchema(): string
|
||||||
{
|
{
|
||||||
$schema = $this->retrieveFromServer(['HTTP_X_FORWARDED_PROTO', 'REQUEST_SCHEME', 'HTTP_SCHEME']);
|
$schema = $this->retrieveFromServer(['HTTP_X_FORWARDED_PROTO', 'REQUEST_SCHEME', 'HTTP_SCHEME']);
|
||||||
if (empty($schema)) {
|
if (empty($schema)) {
|
||||||
@@ -122,7 +122,7 @@ final class Nexus
|
|||||||
|
|
||||||
public function getRequestHost(): string
|
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));
|
return $this->getFirst(strval($host));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user