From 426c938bd0336e95a162e5628c769740b8f40da8 Mon Sep 17 00:00:00 2001 From: Silas Date: Thu, 26 Apr 2018 16:28:26 -0400 Subject: [PATCH] let browser determine http/https --- index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 57dabd2..0fb05be 100644 --- a/index.php +++ b/index.php @@ -30,11 +30,11 @@ if (!empty($_GET['url'])) { file_put_contents($hashfilepath, $url); - $shortUrl = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?'.$urlhash; + $shortUrl = $_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'].'?'.$urlhash; $qrcode = (new QrCode())->setText($shortUrl); - $content = ''.$shortUrl.'
' + $content = ''.$shortUrl.'
' .''; } elseif (!empty($_GET)) { $urlhash = key($_GET);