From 522141f593f89fbcb1221835d7ad2a3f878774d6 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Thu, 31 May 2018 12:51:18 +0900 Subject: [PATCH] Update networktool.php --- helper/networktool.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helper/networktool.php b/helper/networktool.php index 50f599e..d970df3 100644 --- a/helper/networktool.php +++ b/helper/networktool.php @@ -82,3 +82,9 @@ if(!function_exists("get_network_hostname")) { return $host; } } + +if(!function_exists("check_secure_protocol")) { + function check_secure_protocol() { + return (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || $_SERVER['SERVER_PORT'] == 443; + } +}