Handled domain determination when constant APP_URL is defined but empty.
Now the bahavior matches the comments in config.php: // Fully qualified domain name of your webserver. // If this is unset or empty, the servername is determined automatically. // You *have to set this* if you are running Framadate behind a reverse proxy. // const APP_URL = '<www.mydomain.fr>';
This commit is contained in:
parent
324ac9dfcb
commit
b58e61c575
@ -39,9 +39,11 @@ class Utils {
|
||||
$dirname = $dirname === '\\' ? '/' : $dirname . '/';
|
||||
$dirname = str_replace('/admin', '', $dirname);
|
||||
$dirname = str_replace('/action', '', $dirname);
|
||||
$server_name = (defined('APP_URL') ? APP_URL : $serverName) . $port . $dirname;
|
||||
|
||||
return $scheme . '://' . preg_replace('#//+#', '/', $server_name);
|
||||
$appUrlConfig = defined('APP_URL') ? APP_URL : '';
|
||||
$domain = $appUrlConfig === '' ? $serverName : $appUrlConfig;
|
||||
|
||||
return $scheme . '://' . preg_replace('#//+#', '/', $domain . $port . $dirname);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user