Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2018-10-26 13:08:01 +0300
committerPhie <phie@phie.ovh>2018-10-26 13:08:01 +0300
commit3c35d14fe50384e7eae1595c169dcb99569f6d75 (patch)
tree684e37140fc18f27d839c9d281dbd17e4736b05c /templates/settings.php
parenta2c1afc3c14f7d1c207a352adcd1749950ac1b14 (diff)
force https
Diffstat (limited to 'templates/settings.php')
-rwxr-xr-xtemplates/settings.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/settings.php b/templates/settings.php
index 4f24dc3..f91095a 100755
--- a/templates/settings.php
+++ b/templates/settings.php
@@ -2,6 +2,10 @@
$currentpath = __DIR__."/CarnetElectron/";
$root = \OCP\Util::linkToAbsolute("carnet","templates");
+if(strpos($root,"http://") === 0 && !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'){
+ //should be https...
+ $root = "https".substr($root,strlen("http"));
+}
$file = file_get_contents($currentpath."settings/index.html");
//