From 1d7031e4f70f9c147cf1ccb8224a71d41fb89712 Mon Sep 17 00:00:00 2001 From: ghost Date: Mon, 24 Apr 2023 02:32:03 +0300 Subject: [PATCH] make protocol settings adaptive --- config/app.php.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/app.php.txt b/config/app.php.txt index 27da7ea..66ad4d5 100644 --- a/config/app.php.txt +++ b/config/app.php.txt @@ -11,7 +11,7 @@ error_reporting(E_ALL); * Project domain, without slash on postfix * */ -define('WEBSITE_DOMAIN', (issue($_SERVER['HTTP_HOST']) ? 'http://' . $_SERVER['HTTP_HOST'] : '')); +define('WEBSITE_DOMAIN', (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 'https' : 'http') . '://' . (!empty($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '')); /* * Search results per page before show the read more link.