Skip to content

Commit

Permalink
Update uri.php
Browse files Browse the repository at this point in the history
  • Loading branch information
gnh1201 authored Apr 12, 2020
1 parent f802210 commit 38805aa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion system/uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@

if(!is_fn("base_url")) {
function base_url() {
return get_config_value("base_url");
$base_url = get_config_value("base_url");
if(empty($base_url)) {
$base_url = sprintf("https://%s", $_SERVER['HTTP_HOST']);
}
return $base_url;
}
}

Expand Down

0 comments on commit 38805aa

Please sign in to comment.