Skip to content

Commit 2292179

Browse files
authored
Merge pull request Athlon1600#36 from miicha/patch-1
make app_url configurable
2 parents 580be29 + 7dc5cc0 commit 2292179

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/helpers.php

+7-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ function str_rot_pass($str, $key, $decrypt = false){
8585
}
8686

8787
function app_url(){
88-
return (!empty($_SERVER['HTTPS']) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
88+
if(Config::get('app_url')){
89+
return Config::get('app_url');
90+
}
91+
else{
92+
return (!empty($_SERVER['HTTPS']) ? 'https://' : 'http://').$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
93+
}
8994
}
9095

9196
function render_string($str, $vars = array()){
@@ -213,4 +218,4 @@ function rel2abs($rel, $base)
213218
return $scheme . '://' . $abs;
214219
}
215220

216-
?>
221+
?>

0 commit comments

Comments
 (0)