From 7df6800d846ad3ecff64fae7fc89ea445d720f41 Mon Sep 17 00:00:00 2001 From: Josh Johnson Date: Wed, 14 Dec 2016 09:12:16 +0000 Subject: [PATCH] Fix for standard port 443 added to https URLS --- app/Config/constants.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Config/constants.php b/app/Config/constants.php index c2e744d5..34f39b67 100644 --- a/app/Config/constants.php +++ b/app/Config/constants.php @@ -65,7 +65,7 @@ }else{ $ht = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')?"https://":"http://"; define('PROTOCOL', $ht); - if($_SERVER['SERVER_PORT'] != 80) + if((PROTOCOL == 'http://' && $_SERVER['SERVER_PORT'] != 80) || (PROTOCOL == 'https://' && $_SERVER['SERVER_PORT'] != 443)) define('DOMAIN', $_SERVER['SERVER_NAME'].":".$_SERVER['SERVER_PORT']."/"); else define('DOMAIN', $_SERVER['SERVER_NAME']."/"); @@ -176,4 +176,4 @@ //define("NODEJS_HOST",'http://www.your-application.com:3002'); //enable this, if you have Node.js setup in the server // If you are enabling NODEJS_HOST, make sure you have PHP version >5.3.0 // Also, remove comment on "use ElephantIO\Client as ElephantIOClient" from the following files -// app/Controller/EasycasesController.php, app/Controller/Component/PostcaseComponent.php, app/webroot/EmailReply.php \ No newline at end of file +// app/Controller/EasycasesController.php, app/Controller/Component/PostcaseComponent.php, app/webroot/EmailReply.php