Skip to content

Commit

Permalink
PUSH
Browse files Browse the repository at this point in the history
  • Loading branch information
NaysKutzu committed May 3, 2024
1 parent 3b11413 commit cba5415
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/MythicalSystems/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,20 @@ public static function isHTTPS() : bool {
}
return false;
}

/**
* Returns the main app url
*
* @return string
*/
public static function getUrl(): string
{
$prot = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
$svhost = $_SERVER['HTTP_HOST'];
$appURL = $prot . '://' . $svhost;
return $appURL;
}


}
?>

0 comments on commit cba5415

Please sign in to comment.