From 5c9237f5fb12f85aa7c84bcf179d4e9248c8fa95 Mon Sep 17 00:00:00 2001 From: Thedro Neely Date: Thu, 26 Dec 2019 19:45:42 -0500 Subject: bootstrap/Functions: Use request scheme on simple api fetch Duplicate calls of this will be slow --- bootstrap/Functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') diff --git a/bootstrap/Functions.php b/bootstrap/Functions.php index a515402..0ec1dac 100644 --- a/bootstrap/Functions.php +++ b/bootstrap/Functions.php @@ -24,7 +24,7 @@ function fetch(string $path, string $field) { $config = include $_SERVER['DOCUMENT_ROOT'] . '/..' . '/AppConfig.php';; $json = file_get_contents( - 'http://' . $_SERVER['SERVER_NAME'] + $_SERVER['REQUEST_SCHEME'] . '://' . $_SERVER['SERVER_NAME'] . $path . '?token=' . $config['cms']['token'] ); $data = json_decode($json, true); -- cgit v1.2.3