diff options
Diffstat (limited to 'templates/index.php')
-rwxr-xr-x | templates/index.php | 4 |
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); |