Skip to content

Commit 936184a

Browse files
Ignore request when the REQUEST_SCHEME does not equal https
1 parent b98a024 commit 936184a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/GateKeeper.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class GateKeeper
2424
private $safetyNetSlug;
2525
private $debug = false;
2626
private $timer;
27+
private $ignoreRequest = false;
2728
public $token;
2829
public $ip='192.168.0.1';
2930
public $agent='undetected';
@@ -50,6 +51,9 @@ public function __construct(Client $client, \Psr\Http\Message\ServerRequestInter
5051
$cookies = $_COOKIE;
5152
}
5253

54+
if (isset($server['REQUEST_SCHEME'])){
55+
$this->ignoreRequest = strtolower($server['REQUEST_SCHEME']) != "https";
56+
}
5357

5458
// Token in URL
5559
if (isset($get[self::TOKEN_URL])) {
@@ -183,7 +187,7 @@ private function ignoreUrl()
183187
*/
184188
public function checkRequest()
185189
{
186-
if($this->ignoreUrl()) {
190+
if($this->ignoreUrl() || $this->ignoreRequest) {
187191
$mock = new ApiObject;
188192
$mock->status = 0;
189193
$mock->token = $this->token;

0 commit comments

Comments
 (0)