Skip to content

Commit 0133c26

Browse files
committed
ISSUE-337: fix pipeline
1 parent dede18b commit 0133c26

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

public/app_test.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
require dirname(__DIR__) . '/vendor/autoload.php';
99

1010
Bootstrap::getInstance()
11-
->unsetHeaders()
1211
->ensureDevelopmentOrTestingEnvironment()
1312
->setEnvironment(Environment::TESTING)
1413
->configure()

src/Core/Bootstrap.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function ensureDevelopmentOrTestingEnvironment(): self
125125
if (isset($_ENV['APP_ENV']) && $_ENV['APP_ENV'] === Environment::TESTING) {
126126
return $this;
127127
}
128-
$usesProxy = isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']);
128+
$usesProxy = isset($_SERVER['HTTP_CLIENT_IP']);
129129
$isOnCli = PHP_SAPI === 'cli' || PHP_SAPI === 'cli-server';
130130
$isLocalRequest = isset($_SERVER['REMOTE_ADDR'])
131131
&& in_array($_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'], true);
@@ -137,12 +137,6 @@ public function ensureDevelopmentOrTestingEnvironment(): self
137137
return $this;
138138
}
139139

140-
public function unsetHeaders(): self
141-
{
142-
unset($_SERVER['HTTP_X_FORWARDED_FOR']);
143-
return $this;
144-
}
145-
146140
/**
147141
* Main entry point called at every request usually from global scope. Checks if everything is correct
148142
* and loads the configuration.

0 commit comments

Comments
 (0)