Reorder conditional for CLI check, then URI comparison.
- Reordered the condition to first check for CLI mode before URI comparison.
This commit is contained in:
parent
24f1f6c974
commit
41f2ddea37
@ -2,7 +2,7 @@
|
|||||||
require 'vendor/autoload.php';
|
require 'vendor/autoload.php';
|
||||||
require 'config.php';
|
require 'config.php';
|
||||||
|
|
||||||
if($_SERVER["REQUEST_URI"] == '/metrics' || php_sapi_name() == 'cli') {
|
if(php_sapi_name() == 'cli' || $_SERVER["REQUEST_URI"] == '/metrics') {
|
||||||
header('Content-Type: text/plain; version=0.0.4');
|
header('Content-Type: text/plain; version=0.0.4');
|
||||||
foreach ($config as $key => &$c) {
|
foreach ($config as $key => &$c) {
|
||||||
if(isset($c['command'])) {
|
if(isset($c['command'])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user