Skip to content

Commit

Permalink
Support http and https
Browse files Browse the repository at this point in the history
  • Loading branch information
cygri committed Mar 17, 2016
1 parent 89dbc83 commit fc5ba5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions default.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

error_reporting(E_ALL);
$config = array(
'site_base' => 'http://prefixcc.local/', // for local development
// 'site_base' => 'http://prefix.cc/', // for production
// Without protocol, to allow for either http or https
'site_base' => '//prefixcc.local/', // for local development
// 'site_base' => '//prefix.cc/', // for production
'block_time' => 60, // seconds -- this is for local development
// 'block_time' => 60 * 60 * 16, // seconds -- this is for production
'db_host' => 'localhost',
Expand Down
4 changes: 3 additions & 1 deletion lib/response.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ class Response {
);

function __construct($base, $page_uri) {
$this->base = $base;
$protocol = (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off')
? 'http' : 'https';
$this->base = "$protocol:$base";
$this->page_uri = $page_uri;
}

Expand Down

0 comments on commit fc5ba5d

Please sign in to comment.