aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-12-26 19:45:42 -0500
committerThedro Neely <thedroneely@gmail.com>2019-12-26 19:48:48 -0500
commit5c9237f5fb12f85aa7c84bcf179d4e9248c8fa95 (patch)
treef670dd689385c8fc4fe2f19ea9898e158b1f7c99
parent0c9334bacf14748f62a416390307a483a520abe9 (diff)
downloadthedroneely.com-5c9237f5fb12f85aa7c84bcf179d4e9248c8fa95.tar.gz
thedroneely.com-5c9237f5fb12f85aa7c84bcf179d4e9248c8fa95.tar.bz2
thedroneely.com-5c9237f5fb12f85aa7c84bcf179d4e9248c8fa95.zip
bootstrap/Functions: Use request scheme on simple api fetch
Duplicate calls of this will be slow
-rw-r--r--.drone.yml2
-rw-r--r--bootstrap/Functions.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/.drone.yml b/.drone.yml
index ddc8eaa..b5610aa 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -123,7 +123,7 @@ steps:
scp -r -o StrictHostKeyChecking=no -P $ORIGIN_PORT -vT -i ssh-key images/*
$ORIGIN_USER@$ORIGIN_HOST:/srv/http/staging/thedroneely.com/public/images
-- >
+ - >
ssh -o StrictHostKeyChecking=no -p $ORIGIN_PORT -vT -i ssh-key $ORIGIN_USER@$ORIGIN_HOST
'find /srv/http/staging/thedroneely.com/public/images -type f -exec touch -d "2 days ago" {} +'
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);