Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for standard port 443 added to https URLS #158

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/Config/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']."/");
Expand Down Expand Up @@ -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
// app/Controller/EasycasesController.php, app/Controller/Component/PostcaseComponent.php, app/webroot/EmailReply.php