From d38b545c8147b537b0b7efa729fd0f38677602a7 Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Sun, 6 Aug 2017 22:54:31 -0600 Subject: [PATCH] Support nonstandard ports --- mobile/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mobile/index.php b/mobile/index.php index d42feb1..55b42e0 100644 --- a/mobile/index.php +++ b/mobile/index.php @@ -101,7 +101,7 @@ switch ($VARS['action']) { // Format paths as absolute URLs foreach ($apps as $k => $v) { if (strpos($apps[$k]['url'], "http") === FALSE) { - $apps[$k]['url'] = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . $apps[$k]['url']; + $apps[$k]['url'] = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://" . $_SERVER['HTTP_HOST'] . ($_SERVER['SERVER_PORT'] != 80 || $_SERVER['SERVER_PORT'] != 443 ? ":" . $_SERVER['SERVER_PORT'] : "") . $apps[$k]['url']; } } exit(json_encode(["status" => "OK", "apps" => $apps]));