aboutsummaryrefslogtreecommitdiffstats
path: root/core/application.php
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2017-11-13 11:53:04 +0100
committerThomas Lange <code@nerdmind.de>2017-11-13 11:53:04 +0100
commit146b74968f6a56163bf2a618addbb5a7a03f4684 (patch)
tree75d785ee7284e46c073949e7a490ee1803f09bb7 /core/application.php
parent78c5974cd34559d0130d8be509935e2c992cd9ca (diff)
downloadblog-146b74968f6a56163bf2a618addbb5a7a03f4684.tar.gz
blog-146b74968f6a56163bf2a618addbb5a7a03f4684.tar.xz
blog-146b74968f6a56163bf2a618addbb5a7a03f4684.zip
The default value for "PATHINFO.PROT" is now "https" if $_SERVER['REQUEST_SCHEME'] is not defined (https://github.com/Nerdmind/Blog/issues/8). In addition, the default value for "PATHINFO.HOST" is now "localhost" if $_SERVER['HTTP_HOST'] is not defined.
Diffstat (limited to 'core/application.php')
-rw-r--r--core/application.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/application.php b/core/application.php
index fd8d474..4c7fdb2 100644
--- a/core/application.php
+++ b/core/application.php
@@ -52,8 +52,8 @@ $configuration = [
'TEMPLATE.LANG' => 'en',
'ADMIN.TEMPLATE' => 'admin',
'ADMIN.LANGUAGE' => 'en',
- 'PATHINFO.PROT' => $_SERVER['REQUEST_SCHEME'],
- 'PATHINFO.HOST' => $_SERVER['HTTP_HOST'],
+ 'PATHINFO.PROT' => $_SERVER['REQUEST_SCHEME'] ?? 'https',
+ 'PATHINFO.HOST' => $_SERVER['HTTP_HOST'] ?? 'localhost',
'PATHINFO.BASE' => '',
'PAGE.DIRECTORY' => 'page',
'POST.DIRECTORY' => 'post',