Skip to content

Commit

Permalink
Return schemaless URLs. Closes #57
Browse files Browse the repository at this point in the history
  • Loading branch information
claviska committed Aug 24, 2016
1 parent d78c12b commit c9a3c0a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/source/classes/Postleaf.php
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,7 @@ public static function subfolder() {

// Returns Postleaf's base URL, optionally concatenating additional folders
public static function url() {
// Get protocol and hostname
$protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';
// Get the hostname
$hostname = $_SERVER['HTTP_HOST'];

// Determine if Postleaf is running from a subfolder
Expand All @@ -450,7 +449,7 @@ public static function url() {
$path = ltrim($path, '/');

// Generate the URL
return "$protocol://$hostname/$path";
return "//$hostname/$path";
}

// Convert a UTC date string to local time
Expand Down

0 comments on commit c9a3c0a

Please sign in to comment.