aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2021-04-11 09:02:01 +0300
committerAqua-sama <aqua@iserlohn-fortress.net>2021-04-11 09:02:15 +0300
commit2c28ea21a6114f47ac73161045f3684607c89265 (patch)
treeebe76ecf3c53de89e314ee624e07e96e0f99b220
parentAdd base url config (diff)
downloadbugtracker-2c28ea21a6114f47ac73161045f3684607c89265.tar.xz
Use HTTP_HOST if SERVER_NAME is localhost
-rw-r--r--config.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/config.php b/config.php
index eaaa132..3f930b1 100644
--- a/config.php
+++ b/config.php
@@ -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'));