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:
Diffstat (limited to 'templates/index.php')
-rwxr-xr-xtemplates/index.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/templates/index.php b/templates/index.php
index acc52a0..d031aa8 100755
--- a/templates/index.php
+++ b/templates/index.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."index.html");
//
$file = str_replace("href=\"","href=\"".$root."/CarnetElectron/",$file);