diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-04-11 09:02:01 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2021-04-11 09:02:15 +0300 |
commit | 2c28ea21a6114f47ac73161045f3684607c89265 (patch) | |
tree | ebe76ecf3c53de89e314ee624e07e96e0f99b220 | |
parent | Add base url config (diff) | |
download | bugtracker-2c28ea21a6114f47ac73161045f3684607c89265.tar.xz |
Use HTTP_HOST if SERVER_NAME is localhost
-rw-r--r-- | config.php | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -7,10 +7,14 @@ $config = array( 'password' => 'red' ), 'urls' => array( - 'base' => 'http://localhost:8080' + 'base' => 'http://' . $_SERVER['SERVER_NAME'] ) ); +if($config['urls']['base'] == 'http://localhost') { + $config['urls']['base'] = 'http://' . $_SERVER['HTTP_HOST']; +} + define("LIBRARY_PATH", realpath(dirname(__FILE__) . '/library')); define("TEMPLATES_PATH", realpath(dirname(__FILE__) . '/templates')); |